Django project skeleton

Django is a web framework for perfectionists with deadlines as is stated on their website. But it can be tedious to bootstrap new Django project from scratch for your own hosting environment. As long as there are different servers and different people maintaining those servers there will be differences how the server is handling running your projects. And this applies to all frameworks and projects.

I usually run Django in dedicated WSGI daemon which is taking care of process handling and monitoring. Then I have my preferred way of handling database servers and static files. And of course logging and error reporting. And the way development and deployment happens.

All this is outside of Django but still affects the way you start a new project. When you have all those things ready when you get to the point you are deploying the project to the production server for the first time you save time and make fewer mistakes.

The skeleton is created based on the instructions in http://jacobian.org/writing/django-apps-with-buildout/. After reading that post I saw the light and started to develop my own project skeleton. The main difference between Jacobs idea and mine is how Django apps are handled.

The skeleton makes heavy use of re-usability by using separate Python egg for each Django app. You can start coding the apps in the same project and possibly in the same source repository. Then when you need one app in two different projects you can separate it to its own source repo and make an egg out of it.

As this is an ongoing process I’m always updating the skeleton when I get new ideas and the tools get better. More detailed information about the project skeleton can be found in the source repository http://bitbucket.org/derega/django-buildout-skeleton