Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

django-admin.py startproject --template https://github.com/cyberdelia/django-heroku-template/zipball/master --extension py,md --name Procfile yourprojectname

branch: master
README.md

{{ project_name|title }} Django Project

Prerequisites

  • python >= 2.5
  • pip
  • virtualenv/wrapper (optional)
  • foreman (gem)
  • heroku (gem)

Installation

Creating the environment

Create a virtual python environment for the project. If you're not using virtualenv or virtualenvwrapper you may skip this step.

For virtualenvwrapper

mkvirtualenv --no-site-packages {{ project_name }}-env

For virtualenv

virtualenv --no-site-packages {{ project_name }}-env

cd {{ project_name }}-env

source bin/activate

Install requirements

cd {{ project_name }}

pip install -r requirements.txt

Create app at heroku

heroku apps:create -s cedar {{ project_name}}

Setup addons

Add sentry addon to your heroku app, to enable exception logging (optional)

heroku addons:add sentry:developer

Configure project

Edit file .env

Sync database

foreman run python {{ project_name }}/manage.py syncdb

Running

foreman start

Open browser to 127.0.0.1:5000

Something went wrong with that request. Please try again.