Django 1.7 template for Heroku Deployment
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Another Heroku Django Starter Template

A project heavily inspired by &


  • Production-ready configuration for Static Files, Database Settings, Gunicorn, etc.
  • Enhancements to Django's statc file serving functionality via WhiteNoise
  • Enhancements to Django's database functionality via django-postgrespool and dj-database-url
  • Separate settings and requirements files for development and production environments
  • Development debug toolbar installed for local dev environment
  • A few more basic starter heroku add-ons added for performance tracking, caching and email

How to Use

To use this project, follow these steps:

  1. Create your working environment.
  2. Install Django ($ pip install django)
  3. Create a new project using this template

Creating Your Project

Using this template to create a new Django app is easy::

$ startproject --template= --name=Procfile helloworld

You can replace helloworld with your desired project name.

Deployment to Heroku

Required to have Heroku toolbelt installed

$ git init
$ git add -A
$ git commit -m "Initial commit"
$ heroku create
$ # Or to get a desired heroku app-name supply the above command with desired name: `heroku create myhelloworld`
$ git push heroku master
$ # replace 'helloworld' with your django project name that you used above to initialize it
$ heroku config:set DJANGO_SETTINGS_MODULE=''
$ heroku config:set SECRET_KEY=`openssl rand -base64 32`
$ #
$ heroku config:set PYTHONHASHSEED=random
$ heroku run python syncdb

Adding the basic addons to Heroku app

$ heroku addons:add newrelic:stark
$ heroku config:set NEW_RELIC_APP_NAME='helloworld Web Site (Production)'
$ heroku addons:add memcachier
$ heroku addons:add papertrail
$ heroku addons:add mandrill

Now rejoice on setting up the basic django app on heroku, and start developing on local

$ # Personal habit to make executable. 
$ # instead of `python runserver` now you can write `./ runserver`
$ chmod +x

$ # To start local server with debug toolbar just run: 
$ ./ runserver

Further Reading


  • Add functionality to facilitate workers