A Django 1.10 based web app built with Python 3.6, using Postgresql database using the Heroku Django Template Built for running on Heroku.
- Install postgres database. Currently, Heroku uses 9.3.15 but the development has been successfully done with 9.6.1.0, so both are fine
- Copy .env_default file as .env and add the correct environment variables
- Set the environment variables:
source .env
pip install -r requirements.txt
python manage.py collectstatic
python manage.py test
python manage.py runserver
git push heroku master
- Check that you have all the needed environment variables at Heroku
- If migrations were added, then run migrate on heroku:
heroku run python manage.py migrate