xxxxxxxxxx
#Run the following command to check that your db url is set properly:
$ heroku config
#In the settings.py
import dj_database_url
DATABASES['default'] = dj_database_url.config(conn_max_age=600)
xxxxxxxxxx
Just follow the commands provided by heroku's official website. For the convinient the link is at the of my answer. Make sure your remove the addon by simply writing the below code-
> heroku addons:remove shared-database:5mb