Changed the prod.py settings file:
1) Moved the 'import dj_database_url' to below the database settings given error in logs.