Code

Ticket #10328: request-response.diff

File request-response.diff, 1.2 KB (added by leovitch, 5 years ago)

diff for docs/ref/request-reponse.txt

Line 
1Index: docs/ref/request-response.txt
2===================================================================
3--- docs/ref/request-response.txt       (revision 9904)
4+++ docs/ref/request-response.txt       (working copy)
5@@ -37,6 +37,25 @@
6 
7    Example: ``"/music/bands/the_beatles/"``
8 
9+.. attribute:: HttpRequest.path_info
10+
11+   Under some web server configurations,
12+   the portion of the URL after the host name is split up 
13+   into a script prefix portion and a path info portion 
14+   (this happens, for example, when using the ``django.root`` option
15+   with the
16+   :ref:`modpython handler from Apache <howto-deployment-modpython>`). 
17+   The ``path_info`` attribute always contains the 
18+   path info portion of the path, 
19+   no matter what web server is being used. 
20+   Using this instead of ``path`` can make your code 
21+   much easier to move between test and deployment servers.
22+
23+   Example: If the ``django.root`` for your application is set to
24+   ``"/minfo"``, then ``path`` might be
25+   ``"/minfo/music/bands/the_beatles/"`` but ``path_info``
26+   would be ``"/music/bands/the_beatles/"``.
27+
28 .. attribute:: HttpRequest.method
29 
30     A string representing the HTTP method used in the request. This is