1.Routing, rendering, and auth settings
INSTALLED_APPS, MIDDLEWARE, ROOT_URLCONF, TEMPLATES, and DATABASES wire together which code runs and where data lives; AUTH_PASSWORD_VALIDATORS and AUTHENTICATION_BACKENDS control how a password is judged and how a login is checked.
Key features
- INSTALLED_APPS has no default (empty list) — an app not listed here is invisible to migrate, admin, and the template loader
- MIDDLEWARE order matters: request-phase runs top-to-bottom, response-phase runs bottom-to-top
- ROOT_URLCONF names the dotted path to the module holding the top-level urlpatterns
- DATABASES must define a "default" key at minimum — Django refuses to start without one
- AUTH_PASSWORD_VALIDATORS is a list of validator classes checked in order when a user sets a password
Core routing, rendering, and auth settings
Command
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
]INSTALLED_APPS/MIDDLEWARE/ROOT_URLCONF/TEMPLATES/DATABASES wire together what exists and where data lives; AUTH_PASSWORD_VALIDATORS and AUTHENTICATION_BACKENDS are both ordered lists tried in sequence.