-
Book Overview & Buying
-
Table Of Contents
Mastering Django: Core
By :
All attributes should be considered read-only, unless stated otherwise below. session is a notable exception.
HttpRequest.scheme
A string representing the scheme of the request (http or https usually).
HttpRequest.body
The raw HTTP request body as a byte string. This is useful for processing data in different ways than conventional HTML forms: binary images, XML payload etc. For processing conventional form data, use HttpRequest.POST.
You can also read from an HttpRequest using a file-like interface. See HttpRequest.read().
HttpRequest.path
A string representing the full path to the requested page, not including the domain.
Example: /music/bands/the_beatles/
HttpRequest.path_info
Under some web server configurations, the portion of the URL after the host name is split up into a script prefix portion and a path info portion. The path_info attribute always contains the path info portion of the path, no matter what web server is being used. Using this instead...
Change the font size
Change margin width
Change background colour