Technical writing about Python & Django

🐙 Staff Software Engineer at Kraken Technologies 🎸 Co-founder of Glued to Music

How to Structure Django Projects

Here are some notes on how to layout a Django project. It breaks away from structuring a project around Django “apps” and instead uses a clear separation between three core layers; data, domain, and interfaces. Let’s use the following example, an e-commerce site called “Crema” where people can purchase coffee goods. Below is a layout of the fundamental directories. src/ crema/ data/ migrations/ models/ domain/ baskets/ orders/ products/ users/ interfaces/ actions/ management/ commands/ dashboard/ orders/ products/ users/ store/ account/ basket/ checkout/ products/ tests/ functional/ unit/ The src/ directory lives in the root of the repository, alongside files such as README....

June 25, 2018 · James Beith