0
0
Djangoframework~5 mins

Installed apps management in Django

Choose your learning style9 modes available
Introduction

Installed apps management helps Django know which parts of your project to use. It tells Django what features and code to include.

When you add a new feature or tool to your Django project.
When you want to enable built-in Django features like admin or authentication.
When you install third-party packages that need to be active in your project.
When you want to organize your project into smaller reusable parts.
When you want to disable or remove features by taking apps out.
Syntax
Django
INSTALLED_APPS = [
    'app_name',
    'django.contrib.admin',
    'third_party_app',
]
Each item is a string with the app's Python path.
Order usually does not matter, but some apps may depend on others.
Examples
This example includes Django's admin and auth apps plus a custom app called 'myapp'.
Django
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'myapp',
]
Here, two third-party apps for APIs and CORS are added along with a 'blog' app.
Django
INSTALLED_APPS = [
    'rest_framework',
    'corsheaders',
    'blog',
]
Sample Program

This simple script prints the names of all apps Django knows about from the settings.

Django
from django.conf import settings

# Print all installed apps
for app in settings.INSTALLED_APPS:
    print(f"App: {app}")
OutputSuccess
Important Notes

Always restart your Django server after changing INSTALLED_APPS.

Missing an app here means Django ignores its models, views, and templates.

Use full Python paths for apps, not just folder names.

Summary

INSTALLED_APPS lists all active apps in your Django project.

Adding or removing apps here controls what Django loads and uses.

It is essential for enabling features and organizing your project.