- Make sure to include
dj-database-url==0.5.0
in yourrequirements.txt
file. - Add the following line at the bottom of
settings.py
file:import os import dj_database_url if 'DATABASE_URL' in os.environ: DATABASES = { 'default': dj_database_url.parse(os.environ['DATABASE_URL'], conn_max_age=600) }