Code

Ticket #5550: doc404.diff

File doc404.diff, 2.2 KB (added by whiskybar, 6 years ago)
Line 
1Index: docs/request_response.txt
2===================================================================
3--- docs/request_response.txt   (revision 6783)
4+++ docs/request_response.txt   (working copy)
5@@ -558,7 +558,9 @@
6     * If you don't define your own 404 view -- and simply use the default,
7       which is recommended -- you still have one obligation: To create a
8       ``404.html`` template in the root of your template directory. The default
9-      404 view will use that template for all 404 errors.
10+      404 view will use that template for all 404 errors. The context of that
11+      template will contain the path of the requested URL (e.g.,
12+      ``'/app/pages/bad_page/'``) in the variable ``request_path``.
13
14     * If ``DEBUG`` is set to ``True`` (in your settings module) then your 404
15       view will never be used, and the traceback will be displayed instead.
16@@ -572,7 +574,8 @@
17 template ``500.html``.
18
19 This means you need to define a ``500.html`` template in your root template
20-directory. This template will be used for all server errors.
21+directory. This template will be used for all server errors. No specific
22+information about the error will be added to the context of that template.
23
24 This ``server_error`` view should suffice for 99% of Web applications, but if
25 you want to override the view, you can specify ``handler500`` in your
26Index: docs/tutorial03.txt
27===================================================================
28--- docs/tutorial03.txt (revision 6783)
29+++ docs/tutorial03.txt (working copy)
30@@ -341,7 +341,9 @@
31     * If you don't define your own 404 view -- and simply use the default,
32       which is recommended -- you still have one obligation: To create a
33       ``404.html`` template in the root of your template directory. The default
34-      404 view will use that template for all 404 errors.
35+      404 view will use that template for all 404 errors.The context of that
36+      template will contain the path of the requested URL (e.g.,
37+      ``'/app/pages/bad_page/'``) in the variable ``request_path``.
38     * If ``DEBUG`` is set to ``True`` (in your settings module) then your 404
39       view will never be used, and the traceback will be displayed instead.
40