Django

Code

Changeset 6808

Show
Ignore:
Timestamp:
12/01/07 14:11:55 (9 months ago)
Author:
ubernostrum
Message:

Fixed #5550: Documented the context used by the default view for 404 and 500 errors.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/request_response.txt

    r6469 r6808  
    556556      every regular expression in the URLconf. 
    557557 
    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. 
    562565 
    563566    * If ``DEBUG`` is set to ``True`` (in your settings module) then your 404 
     
    573576 
    574577This means you need to define a ``500.html`` template in your root template 
    575 directory. This template will be used for all server errors. 
     578directory. This template will be used for all server errors. The 
     579default 500 view passes no variables to this template. 
    576580 
    577581This ``server_error`` view should suffice for 99% of Web applications, but if