Django Heroku

by oditorium



A Django Template Project for Heroku

Manual Installation

After installing the Heroku Toolbelt run the following commands:

git clone
cd django-slack
heroku create
heroku config:set HEROKU=1
git push heroku +master


For whitenoise to work the following conditions need to be fulfilled

  • the staticfiles app django.contrib.staticfiles must be installed

  • in the settings file, STATIC_URL and STATIC_ROOT (the URL and file system location of the collected static files respectively) and STATICFILES_STORAGE must be set

  • the wsgi application must be adjusted for whitenoise (we are using a different file,

  • the variable DISABLE_COLLECTSTATIC must be false'ish, eg by doing heroku config:unset DISABLE_COLLECTSTATIC

Those code snippets are from


STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR + '/staticfiles'
STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage'
WSGI_APPLICATION = '_project.wsgi-whitenoise.application'

The file should be as follows

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "_project.settings")
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = DjangoWhiteNoise( get_wsgi_application() )


Once the installation is finished, create a superuser by doing

heroko run ./ createsuperuser

Installation Button

You can directly deploy this repo in Heroku by clicking the button below (you will have to create a free account)


Provided you have set up your heroku toolchain you can create a superuser by doing

heroko run ./ createsuperuser --app <appname> 


Contributions welcome. Send us a pull request!

Change Log

The idea is to use semantic versioning, even though initially we might make some minor API changes without bumping the major version number. Be warned!

  • v0.9.1 recreated settings from a complete settings file (minimal settings file in branch minimal)
  • v0.9 Initial Release, copied from django-slack