Delivery for Djangos
Django delivery is deploying the application to production. Development settings change to disable DEBUG, set ALLOWED_HOSTS and use environment-based secrets, the app runs under a WSGI or ASGI server such as Gunicorn behind nginx, static files are collected, the database is managed and the deployment is automated and monitored.
Stage: Quality and Deployment · Part of the Django roadmap · Last reviewed 19 November 2026
What to learn in Delivery
- Separate development and production settings using environment variables
- Run the app with Gunicorn behind nginx
- Collect and serve static files in production
- Configure a production database and run migrations during release
- Use Django's check --deploy to review security settings
- Containerise the app with Docker and deploy it
Delivery interview questions
Why must DEBUG be False in production?
With DEBUG on, error pages reveal settings, source code and environment details, and Django keeps all SQL queries in memory. Turning it off hides internals and requires ALLOWED_HOSTS to be set, protecting the site and saving memory.
What is the role of Gunicorn in a Django deployment?
The Django development server is not designed for production. Gunicorn is a WSGI application server that runs multiple worker processes to handle Django requests, usually behind nginx, which serves static files, terminates TLS and proxies the rest.
Where Delivery fits in the Django roadmap
Delivery belongs to the Quality and Deployment stage (advanced level). Production.
Other units in this stage
Back to the full Django roadmap