An approach on the most convenient way to organize directories for robust Django projects.
The structure that sets up Django by default is very basic, when a project starts to grow, it starts to require a better approach, that deals with other aspects of development and deployment such as:
- deployment scripts
- separated tests by units
- having different environments for development, production (staging)
- documentation for the project
Recommended Django directory structure
Summary of the project and how to install it
Step by step guide to deploy
Setup for the project for other devs
How project evolves and what assumptions consider
only in development
non user generated static media
The preferred documentation format is reStructuredText .rst.
Keep virtual environment outside project
media directory should exists only in development, for user generated static media assets (e.g. photos).
assets (e.g. css) controlled by STATICFILES DIRS config variable. Media and static directories in production should be located in a static media server.
- Recommended Django Project Layout by Revsys
- Two Scoops Of Django
- StackOverflow - Best practice for django project working directory structure
- StackOverflow - Django directory structure?
- Starting a Django 1.6 Project the Right Way by Jeff Knupp
- wildfish-django-starter https://github.com/wildfish/wildfish-django-starter
- Django project starter https://github.com/arocks/edge