Skip to content
Boilerplate for Django projects
Python HTML JavaScript Makefile Shell CoffeeScript CSS
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Boilerplate for Django projects

This boilerplate sets a standard Django project along with common components. These components are:

  • Fabric: Website deployment
  • Celery: Async and distributed task queue

Frontend libraries are available with bower:

To install them, run bower install.

Djung uses Grunt to compile and minify css and js. It is configured for use with livereload which you can enable by running grunt watch

On the server, the project is configured by default to use:

Basic usage

You can quickly create a django project using this boilerplate with django-admin: startproject --template project_name

Oneliner to create a project and push it to your staging server (assumes you have cloned the repository and changed the domain in

mkvirtualenv -i django foo; startproject --template djung foo; cd foo; fab staging setup; fab staging deploy

Running the project

Like most production-ready Django project, Djung has several settings files you can use. It currently ships with two different settings: one for local development and one for production. To use one or the other, set the DJANGO_SETTINGS_MODULE environment varible to the appropriate settings module:

export DJANGO_SETTINGS_MODULE=myproject.settings.local

Typing this command will get really old really fast if you have to do it each time you work on your project so it's recommended to add this line to ~/.virtualenvs/myproject/bin/postactivate

Do not forget to set the SECRET_KEY as well in your environment variables. For your convienience, you can use the file config/envvars as your postactivate script or in your production setup.

Something went wrong with that request. Please try again.