Routing, rendering, and auth settings
standardintermediateINSTALLED_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.
Think of it as
These seven settings are the project's wiring diagram — INSTALLED_APPS lists which apps exist, MIDDLEWARE lists what wraps every request, ROOT_URLCONF says where routing starts, TEMPLATES and DATABASES say where rendering and storage happen, and the two AUTH_* settings say how a login is judged and checked. Every other setting configures one of these; these seven decide which pieces are even in the room.
What we're doing: Add a custom password validator alongside Django's built-in ones, understanding that order determines which error a user sees first.
- 7
- A custom validator is just another class implementing validate() — it runs in the position it's listed, after all four built-in ones.
Why this works: Each validator in the list runs independently and every failure is collected — a project can layer a custom rule (like blocking the company name in a password) onto Django's built-in checks without replacing any of them, just by appending to the list.
Listing an app in INSTALLED_APPS after another app that depends on it
Wrong
Better
What you see: No error most of the time (string FK references tolerate any order), but a direct cross-app model import, or a migration dependency, can fail or behave inconsistently depending on list order.
Why: INSTALLED_APPS order is also app-loading order (see App loading order) — while string references are order-independent, other cross-app dependencies (direct imports, some migration dependency graphs) are not, so keeping dependent apps listed after what they depend on avoids relying on luck.
Core routing, rendering, and auth settings
Together
Remember: 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.
See also: settings · middleware · app loading order

