Ticket #5550: doc404.diff

File doc404.diff, 2.2 KB (added by whiskybar, 8 years ago)
  • docs/request_response.txt

     
    558558    * If you don't define your own 404 view -- and simply use the default,
    559559      which is recommended -- you still have one obligation: To create a
    560560      ``404.html`` template in the root of your template directory. The default
    561       404 view will use that template for all 404 errors.
     561      404 view will use that template for all 404 errors. The context of that
     562      template will contain the path of the requested URL (e.g.,
     563      ``'/app/pages/bad_page/'``) in the variable ``request_path``.
    562564
    563565    * If ``DEBUG`` is set to ``True`` (in your settings module) then your 404
    564566      view will never be used, and the traceback will be displayed instead.
     
    572574template ``500.html``.
    573575
    574576This means you need to define a ``500.html`` template in your root template
    575 directory. This template will be used for all server errors.
     577directory. This template will be used for all server errors. No specific
     578information about the error will be added to the context of that template.
    576579
    577580This ``server_error`` view should suffice for 99% of Web applications, but if
    578581you want to override the view, you can specify ``handler500`` in your
  • docs/tutorial03.txt

     
    341341    * If you don't define your own 404 view -- and simply use the default,
    342342      which is recommended -- you still have one obligation: To create a
    343343      ``404.html`` template in the root of your template directory. The default
    344       404 view will use that template for all 404 errors.
     344      404 view will use that template for all 404 errors.The context of that
     345      template will contain the path of the requested URL (e.g.,
     346      ``'/app/pages/bad_page/'``) in the variable ``request_path``.
    345347    * If ``DEBUG`` is set to ``True`` (in your settings module) then your 404
    346348      view will never be used, and the traceback will be displayed instead.
    347349
Back to Top