Commonly occurring design patterns in Django (In a 'this works for me' sense, rather than GOF design patterns)
-
About Django Patterns
- Prerequisites
- How to use the docs
- How to contribute
-
Settings
- Using local_settings.py and settings.py
- Using default values for project and app settings
- Handling SECRET_KEY correctly
- Relative paths in the configuration
- Choosing a media server
-
Urls
- Naming your paths correctly
- Choosing a solid url strategy for apps
- Hashids and crc32 for urls
-
Models
- Avoiding fat views caused by thin models
-
Queries
- Using Prefetch Objects
-
Templates
- Utilizing template blocks (aka 'chunks')
- Accessing SETTINGS from within templates
-
Others
- Leveraging Monolith Structure