#10934: handler404 needs an example
------------------------------------+---------------------------------------
Reporter: mnieber | Owner: nobody
Status: closed | Milestone:
Component: Documentation | Version: 1.0
Resolution: worksforme | Keywords: handler404
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Changes (by rctay):
* status: new => closed
* resolution: => worksforme
Comment:
Replying to [ticket:10934 mnieber]:
> - where exactly does Django look for the handler404 name?
According to the third paragraph of
[[
http://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-
not-found-view the 404 doc]], Django looks in your `urls.py`.
> - should I assign a new object to django.conf.urls.defaults.handler404,
or create the name handler404 inside the views module?
This is also addressed in that same paragraph. You just define a variable
`handler404` and you're set.
> - I did not create a 404.html, how come Django does not complain about
that? (quote: The default 404 view will use that template for all 404
errors.)
AFAIK, django doesn't provide a default `404.html`. If you didn't create
one, you should get a 'template not found' error - that is, if you trigger
a 404, AND disable `DEBUG` or `TEMPLATE_DEBUG` in your settings (not sure
which).
If this isn't the case, then this is a bug with django's template loading
system which should be addressed in a separate ticket.
--
Ticket URL: <
http://code.djangoproject.com/ticket/10934#comment:3>