Django Production Best Practices
Follow these guidelines for professional Django development.
Project Structure
myproject/
├── apps/
│ ├── users/
│ └── articles/
├── config/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ ├── urls.py
│ └── wsgi.py
├── static/
├── templates/
└── manage.py
Security Settings
# production.py
DEBUG = False
ALLOWED_HOSTS = ['yourdomain.com']
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
{# Provenance for articles generated from a source document. Rendered
here rather than stored in the body so it stays accurate and cannot
be edited away, and so the sealed draft stays purely generated. #}
Discussion 0
No comments yet. Be the first to start the discussion!
Leave a Comment