Registering Apps in INSTALLED_APPS
The INSTALLED_APPS Setting
settings.py contains a Python list called INSTALLED_APPS. It starts with Django's built-in apps (admin, auth, sessions) and is where you add every app you create or install.
Example: The INSTALLED_APPS Setting
settings.py contains a Python list called INSTALLED_APPS. It starts with Django's built-in apps (admin, auth, sessions) and is where you add every app you create or install.
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sessions',
'blog',
]
{# Django-only code -- models.py/views.py/urls.py/settings.py
snippets, or template markup using Django template tags/variables
-- can't run standalone via Judge0 or the browser preview, since
it needs a real Django project. Only this course's pure-Python
examples (example_lang == 'python', no Django imports) are
actually runnable, so those still get the button below. #}
Short Name vs AppConfig Path
You can register an app by its short package name (blog) or by pointing directly at its AppConfig class ('blog.apps.BlogConfig'). Both work identically; the explicit path is useful when an app defines custom AppConfig behavior.
Note: Prefer the AppConfig path when the app overrides default_auto_field or adds a ready() hook.
Example: Short Name vs AppConfig Path
You can register an app by its short package name (blog) or by pointing directly at its AppConfig class ('blog.apps.BlogConfig'). Both work identically; the explicit path is useful when an app defines custom AppConfig behavior.
INSTALLED_APPS = [
# ...
'blog.apps.BlogConfig',
]
{# Django-only code -- models.py/views.py/urls.py/settings.py
snippets, or template markup using Django template tags/variables
-- can't run standalone via Judge0 or the browser preview, since
it needs a real Django project. Only this course's pure-Python
examples (example_lang == 'python', no Django imports) are
actually runnable, so those still get the button below. #}
Why Registration Matters
Only apps listed in INSTALLED_APPS get their models discovered by makemigrations, their admin.py loaded, and their templates/static folders searched by Django's template and staticfiles finders.
Example: Why Registration Matters
Only apps listed in INSTALLED_APPS get their models discovered by makemigrations, their admin.py loaded, and their templates/static folders searched by Django's template and staticfiles finders.
python manage.py makemigrations
# 'No changes detected' if the app isn't in INSTALLED_APPS yet
⚠️ Run this command in your terminal.
- Creating an app with startapp but never adding it to INSTALLED_APPS, so its models never get migrated.
- Adding the wrong dotted path (e.g. 'blog.apps' instead of 'blog.apps.BlogConfig' or just blog).
- Placing a custom app before Django's built-in apps in a way that breaks template or static file overriding order.
- INSTALLED_APPS in settings.py is the list of every app Django will load.
- Both the short form (blog) and the AppConfig dotted path ('blog.apps.BlogConfig') work as entries.
- An app's models, admin, and template tags are invisible to Django until it appears in this list.
Chapter Quiz — Complete all 10 topics to unlock
0/10 topics done
Complete these topics first: