diff options
| author | Tim Graham <timograham@gmail.com> | 2013-08-01 18:07:59 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-01 18:07:59 -0400 |
| commit | 31ee1207877578ad683c1d4f3aed47fc6dc7637e (patch) | |
| tree | 67f4060ff80d6429dc668eb564b292c0d0f1f22d /docs/topics | |
| parent | 5df84b268de45fffd90930e6442eb511cba71f5f (diff) | |
Fixed #20667 - Removed discussion of DEBUG from tutorial.
Forward-port of 3493f18d78 from master.
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/http/views.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/topics/http/views.txt b/docs/topics/http/views.txt index 5c27c9c958..ebe5302ef8 100644 --- a/docs/topics/http/views.txt +++ b/docs/topics/http/views.txt @@ -140,18 +140,18 @@ The 404 (page not found) view .. function:: django.views.defaults.page_not_found(request, template_name='404.html') -When you raise an ``Http404`` exception, Django loads a special view devoted -to handling 404 errors. By default, it's the view -``django.views.defaults.page_not_found``, which either produces a very simple -"Not Found" message or loads and renders the template ``404.html`` if you -created it in your root template directory. +When you raise :exc:`~django.http.Http404` from within a view, Django loads a +special view devoted to handling 404 errors. By default, it's the view +:func:`django.views.defaults.page_not_found`, which either produces a very +simple "Not Found" message or loads and renders the template ``404.html`` if +you created it in your root template directory. The default 404 view will pass one variable to the template: ``request_path``, which is the URL that resulted in the error. The ``page_not_found`` view should suffice for 99% of Web applications, but if -you want to override it, you can specify ``handler404`` in your URLconf, like -so:: +you want to override it, you can specify ``handler404`` in your root URLconf +(setting ``handler404`` anywhere else will have no effect), like so:: handler404 = 'mysite.views.my_custom_404_view' |
