A project refers to the entire application and all its parts.

An app refers to a submodule of the project. It’s self-sufficient and not intertwined with the other apps in the project such that, in theory, you could pick it up and plop it down into another project without any modification. An app typically has its own models.py (which might actually be empty). You might think of it as a standalone python module. A simple project might only have one app.

Lets understand Project and App in Django with this realistic example:

Say you are building an online shopping site (e-commerce site) in Django:

Project:

Its simply name of your website. Django will create a python package and give it a name that you have provided. lets say we name it my_shopping_site.

You can create a project in Django with this command

This will create my_shopping_site directory in your working directory and the structure will look like this:

Apps:

It’s those little components that together make up your project. They are the features of your project. In our case (shopping site) it would be:

  • Cart :- Which would have a logic for user selected items for purchase.
  • Products :- Which would have a logic for products that the site is selling.
  • Profile:- Which would have a logic for user information.

and you can create these apps with these commands:

The structure would look like this:

each app focus on a single logical piece of your project.

Posting Django Tutorials with Beginner to Advanced Projects

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store