I want to add a 404 page on my Django site.
I've created a template, 404.html
, and saved it in the root of my /templates directory. I've also made sure that the
from django.conf.urls.defaults import *
line is included at the top of urls.py. I've set DEBUG to False. (I've been following these instructions.)
However, if I try to go to a page that I know doesn't exist - whether a made-up URL or a view specifically designed to do get_object_or_404
- the 404 page doesn't appear: I just get Chrome's standard 'Oops! This link appears to be broken' page.
Oddly, I also have a 500.html template in the same place and that is appearing just fine if I generate a 500 error. What might the problem be?