Deployment checklist#

Use this checklist before pushing a next.dj project to production.

Django settings#

  • DEBUG is False.

  • ALLOWED_HOSTS lists every host the project answers on.

  • SECRET_KEY is unique to the environment and not committed.

  • CSRF_TRUSTED_ORIGINS includes every public origin.

  • DATABASES uses a production engine and a managed credential store.

Run the standard Django deployment check.

shell#
uv run python manage.py check --deploy

Resolve every warning before deploying.

next.dj settings#

Tune NEXT_FRAMEWORK using Production settings (production-oriented commentary and patterns). Canonical semantics for each key live in Settings.

Wizard drafts#

Review these when the project ships a FormWizard.

  • The default SessionFormWizardBackend shares drafts wherever the session engine does, so confirm the session store is durable and shared across workers.

  • When using CacheFormWizardBackend, point it at a cache shared across workers, not local memory, and set a short TIMEOUT for drafts, especially when a step collects personal data.

  • Use a signed or encrypted backend for sensitive flows.

  • Validate cross-step invariants in done so a stale draft value fails with a friendly message, not an integrity error.

See Wizard backend for the backend trade-offs.

Static files#

  • Run uv run python manage.py collectstatic during the build.

  • Confirm that STATIC_ROOT is writable and points at the location your web server expects.

  • Test that hashed asset URLs land in HTML.

  • Configure caching headers on the static origin.

See Static files in production for the production specific guidance.

Database#

  • Apply every migration before starting the new process.

  • Run uv run python manage.py migrate --plan to confirm the migration set.

  • Take a snapshot before applying destructive or high-risk schema changes.

Server#

  • Pick WSGI or ASGI based on whether the project uses streaming responses, SSE, or websockets.

  • Configure the worker count based on the expected concurrency.

  • Set the worker timeout above the slowest expected handler.

See WSGI and ASGI for the server choice.

Monitoring#

  • Forward page_rendered and action_dispatched to your metrics pipeline.

  • Forward form_validation_failed to alerting when failure rate exceeds the baseline.

  • Track router_reloaded if the project mounts a dynamic router.

  • Forward sse_stream_opened, sse_stream_closed, and zone_rendered when the project uses partial rendering.

System checks#

Run the framework system checks as part of CI and as part of the deployment script.

shell#
uv run python manage.py check

A clean exit is required for the deployment to proceed.

Smoke tests#

Hit at least three URLs after the deploy.

  • The site index /.

  • One captured URL such as /notes/<existing-id>/.

  • One action endpoint through a simulated POST.

The smoke tests confirm that the file router is mounted, the database is reachable, and the dispatcher resolves URLs.

See also#

See also

Static files in production for static file handling. Production settings for production settings. Security for the security checklist.