Project vs App (Django)

In Django, a project is the whole website and its settings, while an app is a self-contained module providing one feature (like a blog or auth). A project contains many apps, and a good app can be reused across projects.

Django

This distinction trips up beginners. The project is created with django-admin startproject mysite and holds project-wide configuration: settings.py, the root URLconf, and the WSGI/ASGI entry points. There is exactly one project per site.

An app, created with python manage.py startapp blog, is a folder of related models, views, templates, and URLs that delivers a specific piece of functionality. A project typically has several apps, and you list each in INSTALLED_APPS so Django knows about them.

The design goal is reusability: a well-written app (like Django's own admin or auth) should drop into another project with minimal changes. So keep an app focused on one job rather than dumping everything into a single giant app.

Syntax

django-admin startproject mysite
python manage.py startapp blog

Examples

Python

# project layout
mysite/
    manage.py
    mysite/        # the project package
        settings.py
        urls.py
    blog/          # an app
        models.py
        views.py
        urls.py

Learn it in a lesson

See also

Back to the Dictionary