class Request: (source)
Wrapper allowing to enhance a standard `HttpRequest` instance. Kwargs: - request(HttpRequest). The original request instance. - parsers(list/tuple). The parsers to use for parsing the request content. - authenticators(list/tuple). The authenticators used to try authenticating the request's user.
Method | __getattr__ |
If an attribute does not exist on this instance, then we also attempt to proxy it to the underlying HttpRequest object. |
Method | __init__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | auth |
Sets any non-user authentication information associated with the request, such as an authentication token. |
Method | force |
Undocumented |
Method | user |
Sets the user on the current request. This is necessary to maintain compatibility with django.contrib.auth where the user property is set in the login and logout functions. |
Instance Variable | auth |
Returns any non-user authentication information associated with the request, such as an authentication token. |
Instance Variable | authenticators |
Undocumented |
Instance Variable | negotiator |
Undocumented |
Instance Variable | parser |
Undocumented |
Instance Variable | parsers |
Undocumented |
Instance Variable | user |
Returns the user associated with the current request, as authenticated by the authentication classes provided to the request. |
Property | content |
Undocumented |
Property | data |
Undocumented |
Property | DATA |
Undocumented |
Property | FILES |
Undocumented |
Property | POST |
Undocumented |
Property | query |
More semantically correct name for request.GET. |
Property | QUERY |
Undocumented |
Property | stream |
Returns an object that may be used to stream the request content. |
Property | successful |
Return the instance of the authentication instance class that was used to authenticate the request, or `None`. |
Method | _authenticate |
Attempt to authenticate the request using each authentication instance in turn. |
Method | _default |
Undocumented |
Method | _load |
Parses the request content into `self.data`. |
Method | _load |
Return the content body of the request, as a stream. |
Method | _not |
Set authenticator, user & authtoken representing an unauthenticated request. |
Method | _parse |
Parse the request content, returning a two-tuple of (data, files) |
Method | _supports |
Return True if this requests supports parsing form data. |
Instance Variable | _auth |
Undocumented |
Instance Variable | _authenticator |
Undocumented |
Instance Variable | _content |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _files |
Undocumented |
Instance Variable | _full |
Undocumented |
Instance Variable | _request |
Undocumented |
Instance Variable | _stream |
Undocumented |
Instance Variable | _user |
Undocumented |
If an attribute does not exist on this instance, then we also attempt to proxy it to the underlying HttpRequest object.
Undocumented
Sets any non-user authentication information associated with the request, such as an authentication token.
Sets the user on the current request. This is necessary to maintain compatibility with django.contrib.auth where the user property is set in the login and logout functions. Note that we also set the user on Django's underlying `HttpRequest` instance, ensuring that it is available to any middleware in the stack.
Returns any non-user authentication information associated with the request, such as an authentication token.
Returns the user associated with the current request, as authenticated by the authentication classes provided to the request.
Return the instance of the authentication instance class that was used to authenticate the request, or `None`.
Set authenticator, user & authtoken representing an unauthenticated request. Defaults are None, AnonymousUser & None.
Parse the request content, returning a two-tuple of (data, files) May raise an `UnsupportedMediaType`, or `ParseError` exception.