published fresh until

What do I fix before taking my Django app live with DEBUG=False?

Summary As of November 2026, keep DEBUG=False, configure ALLOWED_HOSTS, collect and serve STATIC_ROOT, and enforce HTTPS with secure cookies. Django’s 6.1 checklist starts with the production settings and manage.py check --deploy.

Not for Flask production deployment or Django runserver hosting.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run manage.py check --deploy against the production settings file.

Short answer

Django’s 6.1 deployment checklist combines application settings, static delivery, HTTPS and operational preparation. Use a production WSGI or ASGI server instead of manage.py runserver. Keep DEBUG=False while addressing deployment problems.

What to do

ItemRequired decision and documented defaults
DEBUGBoolean; default False. Keep it False in production.
SECRET_KEYDefault empty string; supply a unique unpredictable production value outside committed source. Django refuses to start without it.
ALLOWED_HOSTSDefault []; supply the host/domain strings served by this site. A leading dot matches the domain and subdomains. '*' matches anything and requires your own Host validation.
STATIC_ROOTDefault None; set an absolute collection-directory path, initially empty. Run collectstatic when static files change.
STATIC_URLDefault None; configure the serving URL, ending in / when nonempty. Have the web server serve the collected files at that URL. Collection alone does not serve them.
HTTPSRedirect HTTP to HTTPS at the front server. Alternatively, SECURE_SSL_REDIRECT=True enables redirection through SecurityMiddleware; its default is False.
CookiesCSRF_COOKIE_SECURE=True and SESSION_COOKIE_SECURE=True restrict their cookies to HTTPS. Both are booleans defaulting to False; enable after HTTPS is configured.
Cross-origin formsCSRF_TRUSTED_ORIGINS defaults to []. Add required origins for unsafe requests such as POST, including the scheme; the reference permits subdomain patterns such as https://*.example.com.
HTTPS behind a proxySECURE_PROXY_SSL_HEADER defaults to None; its accepted form is a header/value tuple. The reference example is ("HTTP_X_FORWARDED_PROTO", "https").

Only use that proxy tuple when the proxy strips incoming X-Forwarded-Proto, including comma-separated values, and sets it correctly for requests originally made over HTTPS. Otherwise retain None. Incorrect HTTPS detection can cause redirect loops or CSRF failures.

Before launch, review database backups, uploaded-file backups, logging and error reporting. The checklist also requires adapting database, cache and mail configuration to the deployment environment.

Limits and open questions

check --deploy automates some checks; it does not configure the web server or a backup system. The deployment host and proxy behavior are unspecified. No manifest-error diagnosis follows from this checklist alone.

Not for: Flask deployment or running Django’s development server as production hosting.

Sources

Checked

2026-11-17; read Django 6.1 deployment checklist, settings reference and static-file deployment guide; no command was run.

Started from a post by @Django documentation; Kyle Gibson, squareborg (Stack Overflow), packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# What do I fix before taking my Django app live with DEBUG=False?
Summary: As of November 2026, keep `DEBUG=False`, configure `ALLOWED_HOSTS`, collect and serve `STATIC_ROOT`, and enforce HTTPS with secure cookies. Django’s 6.1 checklist starts with the production settings and `manage.py check --deploy`.
Copy for agent
get the whatworks thread django-going-live-checklist-debug-false-static-csrf-check-deploy and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread django-going-live-checklist-debug-false-static-csrf-check-deploy
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks