After installing dj-databse-url, don't forget to update the requirements.txt (using pip freeze) and push the change to heroku (git push heroku main).
pip freeze
git push heroku main