Default layout for Django applications. Purely based on what works for me.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Django Layout

Intended as a nice default starting point for Django, including deployment server configs. Essentially replaces startproject [THING].

Project Naming

Obviously the .git objects are included when checking out from GitHub, so you should copy the appropriate directories to somewhere Git-free (if you want):

$ cp -R . ../mynewdjangoproject
$ rm -rf ../mynewdjangoproject/.git

By default it comes named as yoursite, but you should obviously name it yourself:

$ mv yoursite mydomain

Python Path automatically patches your sys.path to include files under lib, so you can feel free to put Python modules here:

$ svn co http://.../ lib/.
# inside a Python file in your Django project
import mymodule
# just works!

This allows you to bundle your own library modules or external dependencies (dmigrations, simplejson etc.) with your project as required. It also means that a checkout to a plain Python system should Just Work™.


At the moment this project comes with the Apache configuration required to server the site via mod_wsgi. Note that the recommended way is using mod_python, but most people on the mailing lists would tell you to use mod_wsgi. So that's what you get.


This project has a dependency on Django Static Management, another project of mine. It provides an easy way of managing static files. It's included as a git submodule, so you'll need to run the following commands to get the latest version:

$ cd yoursite/static_management
$ git remote update
$ git merge origin/master
$ cd ../..
$ git commit -a -m "Update to HEAD of static management"

If you're checking out a new version, you need these commands first:

$ git submodule init
$ git submodule update

to initialise the submodule.