Locked lesson.
About this lesson
Before we push our website to web hosting, we need to make a couple of slight modifications to some configuration files. In this lesson, we'll discuss important modifications, specifically: Procfile, Pip Install django_heroku, python-decouple, dj_database_url, and gunicorn.
Exercise files
Download this lesson’s related exercise files.
Create Procfile, Pip Install django_heroku, python-decouple, dj_database_url, gunicorn.docx57.7 KB Create Procfile, Pip Install django_heroku, python-decouple, dj_database_url, gunicorn - Solution.docx
58.5 KB
Quick reference
Create Procfile, Pip Install django_heroku, python-decouple, dj_database_url, gunicorn
We need to make a few changes to our app so that it works on Heroku.
When to use
Do this anytime you have an app that you want to host on Heroku.
Instructions
First, we need to create a procfile.
To create a Procfile from the terminal: touch Procfile. Inside the procfile, add this line:
web: gunicorn djangowebsite.wsgi
Pip install several new libraries:
pip install gunicorn
pip install django_heroku
pip install python-decouple
pip install dj_database_url
Hints & tips
- Add a Procfile
- Install several libraries
Lesson notes are only available for subscribers.