heroku loading 500.html instead of index.html
Hi, When I change DEBUG = False in Base.py, Heroku loads 500.html instead of index.html and loads 500.html for admin also i.e. myapp.herokuapp.com/admin. But works properly when its DEBUG=True.
Similarly, When I change DEBUG = False in local.py, my local m/c loads 500.html instead of index.html and loads 500.html for admin also i.e. 127.0.0.1:8888/admin/. But works properly when its DEBUG=True.
NOTE: I have installed django==1.5.1 for this new project and then started following the instructions again
Can someone explain the cause of this ? And What to do to avoid it ?
Answers
On Django 1.5+ and DEBUG = False, you have to set ALLOWED_HOSTS in your settings/base.py. It's supposed to be a list with your domain name in it, so it'll end up being something like ALLOWED_HOSTS = ['gettingstartedwithdjango.com']