Django 404 pages not appearing?
Posted
by AP257
on Stack Overflow
See other posts from Stack Overflow
or by AP257
Published on 2010-04-06T12:10:06Z
Indexed on
2010/04/06
12:13 UTC
Read the original article
Hit count: 263
django
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?
© Stack Overflow or respective owner