Django deploy to Heroku
Prerequisite
If you plan on deploying your django app on heroku, you need to make sure you are using a compatible python version in your project.
The best way to ensure that is to first build you project in a virtual environment using one of these supported python versions :
python-3.9.1
python-3.8.7
python-3.7.9
python-3.6.12
You allo need to install Heroku Client to create and manage your Heroku apps directly from the terminal
Create Virtual Environment
Go to you project folder and create a virtual environment named 'venv' using this python command
Now if you want to install packages, go inside your virtual environment (venv)
Important
Do that every time you need to install a new python package !
Otherwise, the package will be installed globally on your computer
Heroku CLI
The Heroku Command Line Interface (CLI) makes it easy to create and manage your Heroku apps directly from the terminal. It’s an essential part of using Heroku.
Download the Heroku Client using the appropriate version here
To verify your CLI installation, use the heroku --version command
Now login to connect to your Heroku account :