I'm trying to develop 404 and 500 error custom templates for my Django project.
When I change DEBUG to False, Django always returns me:
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
After change ALLOWED_HOSTS to ['.domain.com', 'www.domain.com'] I obtain:
Invalid HTTP_HOST header: 'domain.com'. You may need to add u'domain.com' to ALLOWED_HOSTS.
What am I doing wrong? Why Django does not recognize the variable?
DEBUG = False
should work, so you need to provide more information on how to reproduce the problem. Perhaps you have changed the wrong settings file, or you haven't saved your settings file or restarted the server after making the change. – Alasdair