http.HttpRequest.get_signed_cookie()

HttpRequest.get_signed_cookie(key, default=RAISE_ERROR, salt='', max_age=None) [source] Returns a cookie value for a signed cookie, or raises a django.core.signing.BadSignature exception if the signature is no longer valid. If you provide the default argument the exception will be suppressed and that default value will be returned instead. The optional salt argument can be used to provide extra protection against brute force attacks on your secret key. If supplied, the max_age argument will

http.HttpRequest.get_port()

HttpRequest.get_port() [source] New in Django 1.9. Returns the originating port of the request using information from the HTTP_X_FORWARDED_PORT (if USE_X_FORWARDED_PORT is enabled) and SERVER_PORT META variables, in that order.

http.HttpRequest.get_host()

HttpRequest.get_host() [source] Returns the originating host of the request using information from the HTTP_X_FORWARDED_HOST (if USE_X_FORWARDED_HOST is enabled) and HTTP_HOST headers, in that order. If they don’t provide a value, the method uses a combination of SERVER_NAME and SERVER_PORT as detailed in PEP 3333. Example: "127.0.0.1:8000" Note The get_host() method fails when the host is behind multiple proxies. One solution is to use middleware to rewrite the proxy headers, as in the fol

http.HttpRequest.get_full_path()

HttpRequest.get_full_path() [source] Returns the path, plus an appended query string, if applicable. Example: "/music/bands/the_beatles/?print=true"

http.HttpRequest.GET

HttpRequest.GET A dictionary-like object containing all given HTTP GET parameters. See the QueryDict documentation below.

http.HttpRequest.FILES

HttpRequest.FILES A dictionary-like object containing all uploaded files. Each key in FILES is the name from the <input type="file" name="" />. Each value in FILES is an UploadedFile. See Managing files for more information. Note that FILES will only contain data if the request method was POST and the <form> that posted to the request had enctype="multipart/form-data". Otherwise, FILES will be a blank dictionary-like object.

http.HttpRequest.encoding

HttpRequest.encoding A string representing the current encoding used to decode form submission data (or None, which means the DEFAULT_CHARSET setting is used). You can write to this attribute to change the encoding used when accessing the form data. Any subsequent attribute accesses (such as reading from GET or POST) will use the new encoding value. Useful if you know the form data is not in the DEFAULT_CHARSET encoding.

http.HttpRequest.current_app

HttpRequest.current_app The url template tag will use its value as the current_app argument to reverse().

http.HttpRequest.COOKIES

HttpRequest.COOKIES A standard Python dictionary containing all cookies. Keys and values are strings.

http.HttpRequest.content_type

HttpRequest.content_type New in Django 1.10. A string representing the MIME type of the request, parsed from the CONTENT_TYPE header.