Code from class:
Homework:
Steps to deploy on Heroku:
pip install django-toolbeltpip freeze > requirements.txtheroku create {subdomain}in your project.- Set the proper environment variables on Heroku:
heroku config:set DJANGO_SETTINGS_MODULE={your_project}.heroku_settingsheroku config:set PYTHONPATH={your_project}heroku config:set SECRET_KEY={some key, at least 40 characters}
- Add a file called
heroku_settings.pynext 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.