My Django project works fine locally but as soon as I'm about to deploy to Heroku, I include this piece of code in my settings.py
file:
ENV_TYPE = os.environ.get('ENV_TYPE')
if ENV_TYPE == "HEROKU":
DEBUG = False
Now when I run python manage.py runserver
locally, I get a Server Error (500)
in my browser. But as soon as I change DEBUG
to True
, everything works fine.
What could be the issue?
Kindly note that I set DEBUG = True
, but still, there's no way of viewing the error log. It shows a white screen with the Server Error (500)
on top.