Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #5550: Documented the context used by the default view for 404 …

…and 500 errors.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7fbe014197e38d81398cf94f77501cd9940b9239 1 parent b2dbbd5
James Bennett authored December 01, 2007

Showing 1 changed file with 9 additions and 5 deletions. Show diff stats Hide diff stats

  1. 14  docs/request_response.txt
14  docs/request_response.txt
@@ -555,10 +555,13 @@ Three things to note about 404 views:
555 555
     * The 404 view is also called if Django doesn't find a match after checking
556 556
       every regular expression in the URLconf.
557 557
 
558  
-    * If you don't define your own 404 view -- and simply use the default,
559  
-      which is recommended -- you still have one obligation: To create a
560  
-      ``404.html`` template in the root of your template directory. The default
561  
-      404 view will use that template for all 404 errors.
  558
+    * If you don't define your own 404 view -- and simply use the
  559
+      default, which is recommended -- you still have one obligation:
  560
+      To create a ``404.html`` template in the root of your template
  561
+      directory. The default 404 view will use that template for all
  562
+      404 errors. The default 404 view will pass one variable to the
  563
+      template: ``request_path``, which is the URL which resulted in
  564
+      the 404.
562 565
 
563 566
     * If ``DEBUG`` is set to ``True`` (in your settings module) then your 404
564 567
       view will never be used, and the traceback will be displayed instead.
@@ -572,7 +575,8 @@ the view ``django.views.defaults.server_error``, which loads and renders the
572 575
 template ``500.html``.
573 576
 
574 577
 This means you need to define a ``500.html`` template in your root template
575  
-directory. This template will be used for all server errors.
  578
+directory. This template will be used for all server errors. The
  579
+default 500 view passes no variables to this template.
576 580
 
577 581
 This ``server_error`` view should suffice for 99% of Web applications, but if
578 582
 you want to override the view, you can specify ``handler500`` in your

0 notes on commit 7fbe014

Please sign in to comment.
Something went wrong with that request. Please try again.