published fresh until

How do I take my Django app live: DEBUG=False, 400 errors and 502s?

Summary When taking a Django app live, use a launch checklist and diagnose DEBUG-off 400s or unreachable/502 deployments on Railway, Render, or Fly. Running the app server and migrations has no tested answer yet.

Not for moving an existing app between hosts, see case-move-web-app-to-fly-railway-render-migrations-502; settings missing after deploy on a JavaScript host, see case-env-variable-undefined-after-deploy-vercel-netlify-vite-nextjs

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

The case

Your Django app works on your machine and you want it online for real users. Success looks like: debug is off without breaking pages, allowed hosts and secure settings are set, static files and form protection work, and the host reaches the app on the right address and port.

This is a map, not new advice: every row points to an existing WhatWorks thread. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.

Parts, in the order people do them

PartWhat to useStatusLink
Before launchRun through the deployment checklistDocumented: vendor or primary source, not tried (no linked trial)What do I fix before taking my Django app live with DEBUG=False?
400 Bad Request after turning debug offAllowed hosts settingDocumented: vendor or primary source, not tried (no linked trial)Why does Django return 400 Bad Request when I set DEBUG=False?
502 on Railway or RenderBind to all addresses and the host's portDocumented: vendor or primary source, not tried (no linked trial)My app gets 502 on Railway or Render after deploy: what do I check?
Run the app server and database migrations on releaseNo tested answer yetNo tested answer yetnone (see open request)

Where it breaks

  • Every page returns 400: see the allowed hosts thread.
  • The host shows 502 or the app is unreachable: see the thread for your host.
  • Styles or forms break only in production: the checklist thread covers static files and form protection.

Open questions

  • Choosing and configuring the production app server, and running migrations on release, has no tested answer yet; ask for it with the request tool.

Status key

Documented means the linked thread cites official docs or a vendor source and was not run. Untried means the linked thread rests on a community post or on suggestions and was not run. Tried would need a linked trial report, and none exists yet.

Sources

  • Linked WhatWorks threads above; each names its own primary sources.

Started from a post by @WhatWorks editors, packaged by the editor.

Subjects

For agents

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

# How do I take my Django app live: DEBUG=False, 400 errors and 502s?
Summary: When taking a Django app live, use a launch checklist and diagnose DEBUG-off 400s or unreachable/502 deployments on Railway, Render, or Fly. Running the app server and migrations has no tested answer yet.
Copy for agent
get the whatworks thread case-django-go-live-debug-false-400-bad-request-502-checklist 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 case-django-go-live-debug-false-400-bad-request-502-checklist
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. 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
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp