Code from class:
Homework:
Steps to deploy on Heroku:
pip install django-toolbelt
pip freeze > requirements.txt
heroku create {subdomain}
in your project.- Set the proper environment variables on Heroku:
heroku config:set DJANGO_SETTINGS_MODULE={your_project}.heroku_settings
heroku config:set PYTHONPATH={your_project}
heroku config:set SECRET_KEY={some key, at least 40 characters}
- Add a file called
heroku_settings.py
next to yoursettings.py
. Example - Update your
wsgi.py
. - Add a
Procfile
. Example - Add a
runtime.txt
. Example git commit -am 'Added files for Heroku'
git push heroku master
- If all this works:
heroku run python {your_project}/manage.py migrate
This article from Heroku is much more detailed.