sudo apt-get install python3-venv
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
1. Procfile
web: gunicorn project_name.wsgi
2. Do this in your app/settings.py
app/settings.py
import django_heroku
# Then all the way at the bottom of the file
# ...
django_heroku.settings(locals())
3. Install dependencies
pip install gunicorn
pip install django-heroku
pip freeze > requirements.txt
pkg-resources conflicted for me with Heroku so remove it
4. Create Heroku App
sudo snap install heroku
heroku login
heroku create heroku_project_name
5. Commit Changes
git add .
git commit -m "hosted on Heroku"
git push heroku master
6. Migrate Django
heroku run python manage.py migrate
If you need to set up your Heroku remote on another machine
heroku git:remote -a heroku_project_name
I used this Medium article for the Heroku part with slight changes
No probs! happy to help :-)