Make Applications Real•Reading lesson•Free
Overview
No account is required. Learn the material, try the examples, and mark it complete when you are ready to move on. Sign in with email only if you want to save progress across devices.
Project 4 - Prepare Your Application for Production
This project demonstrates a production-oriented Django configuration.
It is intentionally a configuration exercise rather than a large application.
Install
bash
python -m pip install -r requirements.txtCopy .env.example to .env and set values appropriate to your environment.
Development
bash
python manage.py check
python manage.py runserverProduction-style checks
bash
python manage.py check --deployThe project demonstrates:
- environment variables
- secret configuration
DEBUGALLOWED_HOSTS- CSRF trusted origins
- static files
requirements.txt- Gunicorn
Do not commit .env.
Lesson resources
Supporting code and files from this part of the curriculum.
Finished this lesson?
Keep your place here, or save it across devices with an email link.
Saved in this browser. Save progress with email →