Django

Code

Ticket #6278: 404_500_docs.diff

File 404_500_docs.diff, 1.1 kB (added by Rob Hudson <treborhudson@gmail.com>, 1 year ago)
  • docs/request_response.txt

    old new  
    575575      to the template: ``request_path``, which is the URL that resulted 
    576576      in the 404. 
    577577 
     578    * The 404 view is rendered with ``RequestContext`` and will have access to  
     579      variables supplied by your ``TEMPLATE_CONTEXT_PROCESSORS`` (e.g. MEDIA_URL). 
     580 
    578581    * If ``DEBUG`` is set to ``True`` (in your settings module), then your 404 
    579582      view will never be used, and the traceback will be displayed instead. 
    580583 
     
    588591 
    589592This means you need to define a ``500.html`` template in your root template 
    590593directory. This template will be used for all server errors. The 
    591 default 500 view passes no variables to this template. 
     594default 500 view passes no variables to this template.  The default 500 view 
     595is rendered with an empty ``Context`` to lessen the chance of additional errors. 
    592596 
    593597This ``server_error`` view should suffice for 99% of Web applications, but if 
    594598you want to override the view, you can specify ``handler500`` in your