Django project layout for Heroku

At Blimp we love working with Django. We use it for almost all of our projects, including Blimp and -M.

In Django 1.4, the startproject and startapp commands came with a new template option. Specifying this --template option lets you use a custom project directory structure for your project from a path or URL. By default when you run the startproject management command, it creates a Django project directory structure that contains manage.py and a project package (containing a settings.py and other files) based on this default template.

We decided to create a project template with the things we always end up doing on our Django projects. This template has a couple of useful settings and Fabric commands that make deploying, managing, and using Django with Heroku easier.

Fabric Script
Fabric is definitely the easiest way to execute local and remote shell commands. We’ve created quite a few of these to help with deployment, database management, and Heroku, all aware of the environment, so for example, you can easily run database migrations in development, staging, or production.