If the code run in development but fails with a Bad Request (400) error when you roll it to production.
And there is no indication of what is wrong in the logs.
DEBUG = True
DEBUG = False
Restart the webserver
sudo service httpd restart
And retry reloading the page. If it works then is is possibly an
Bad Fix (don’t do this)! This can cause security issues later as one should limit to the relevant hosts.
ALLOWED_HOSTS = ['*']
Doesn’t work I have seen this answer several places, it is wrong and doesn’t work with version 1.9.4 of Django. Do NOT attempt to mix the asterisk with the host parts
ALLOWED_HOSTS = ['repasta.com', '*.repasta.com', 'localhost']
ALLOWED_HOSTS = ['repasta.com', '.repasta.com', 'localhost']
Web page now shows correctly. Yay!