Skip to content

Instantly share code, notes, and snippets.

@svdgraaf
Created September 15, 2011 08:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save svdgraaf/1218812 to your computer and use it in GitHub Desktop.
Save svdgraaf/1218812 to your computer and use it in GitHub Desktop.
Running Django on Heroku
# create a dir
mkdir foobar
cd foobar
# instantiate a virtual environment
virtualenv --no-site-packages .
# start your virtualenv
source bin/activate
# install django
pip install django
# start your django project
django-admin.py startproject foobar
# I usually rename the appdir itself to 'app', but we don't care in this case.
# from here on, do all your stuff you would normally do, git commit etc.
# ...
# create requirements file in the root dir (./foobar in this case)
pip freeze > requirements.txt
# push your app to heroku
git push heroku master
# ...
# profit!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment