Undocumented
Function | base36 |
Convert a base 36 string to an int. Raise ValueError if the input won't fit into an int. |
Function | escape |
If redirecting to an absolute path (two leading slashes), a slash must be escaped to prevent browsers from handling the path as schemaless and redirecting to another host. |
Function | http |
Format the time to match the RFC1123 date format as specified by HTTP RFC7231 section 7.1.1.1. |
Function | int |
Convert an integer to a base36 string. |
Function | is |
Return ``True`` if the host is either an exact match or a match to the wildcard pattern. |
Function | parse |
Parse a string of ETags given in an If-None-Match or If-Match header as defined by RFC 7232. Return a list of quoted ETags, or ['*'] if all ETags should be matched. |
Function | parse |
Parse a Content-type like header. Return the main content-type and a dictionary of options. |
Function | parse |
Parse a date format as specified by HTTP RFC7231 section 7.1.1.1. |
Function | parse |
Same as parse_http_date, but return None if the input is invalid. |
Function | quote |
If the provided string is already a quoted ETag, return it. Otherwise, wrap the string in quotes, making it a strong ETag. |
Function | url |
Return ``True`` if the url uses an allowed host and a safe scheme. |
Function | urlencode |
A version of Python's urllib.parse.urlencode() function that can operate on MultiValueDict and non-string values. |
Function | urlsafe |
Decode a base64 encoded string. Add back any trailing equal signs that might have been stripped. |
Function | urlsafe |
Encode a bytestring to a base64 string for use in URLs. Strip any trailing equal signs. |
Constant | ASCTIME |
Undocumented |
Constant | ETAG |
Undocumented |
Constant | MONTHS |
Undocumented |
Constant | RFC1123 |
Undocumented |
Constant | RFC3986 |
Undocumented |
Constant | RFC3986 |
Undocumented |
Constant | RFC850 |
Undocumented |
Function | _parseparam |
Undocumented |
Function | _url |
Undocumented |
Function | _urlparse |
Parse a URL into 6 components: <scheme>://<netloc>/<path>;<params>?<query>#<fragment> Return a 6-tuple: (scheme, netloc, path, params, query, fragment). Note that we don't break the components up in smaller bits (e... |
Function | _urlsplit |
Parse a URL into 5 components: <scheme>://<netloc>/<path>?<query>#<fragment> Return a 5-tuple: (scheme, netloc, path, query, fragment). Note that we don't break the components up in smaller bits (e.g. ... |
Constant | __D |
Undocumented |
Constant | __D2 |
Undocumented |
Constant | __M |
Undocumented |
Constant | __T |
Undocumented |
Constant | __Y |
Undocumented |
Constant | __Y2 |
Undocumented |
If redirecting to an absolute path (two leading slashes), a slash must be escaped to prevent browsers from handling the path as schemaless and redirecting to another host.
Format the time to match the RFC1123 date format as specified by HTTP RFC7231 section 7.1.1.1. `epoch_seconds` is a floating point number expressed in seconds since the epoch, in UTC - such as that outputted by time.time(). If set to None, it defaults to the current time. Output a string in the format 'Wdy, DD Mon YYYY HH:MM:SS GMT'.
Return ``True`` if the host is either an exact match or a match to the wildcard pattern. Any pattern beginning with a period matches a domain and all of its subdomains. (e.g. ``.example.com`` matches ``example.com`` and ``foo.example.com``). Anything else is an exact string match.
Parse a string of ETags given in an If-None-Match or If-Match header as defined by RFC 7232. Return a list of quoted ETags, or ['*'] if all ETags should be matched.
Parse a date format as specified by HTTP RFC7231 section 7.1.1.1. The three formats allowed by the RFC are accepted, even if only the first one is still in widespread use. Return an integer expressed in seconds since the epoch, in UTC.
If the provided string is already a quoted ETag, return it. Otherwise, wrap the string in quotes, making it a strong ETag.
Return ``True`` if the url uses an allowed host and a safe scheme. Always return ``False`` on an empty url. If ``require_https`` is ``True``, only 'https' will be considered a valid scheme, as opposed to 'http' and 'https' with the default, ``False``. Note: "True" doesn't entail that a URL is "safe". It may still be e.g. quoted incorrectly. Ensure to also use django.utils.encoding.iri_to_uri() on the path component of untrusted URLs.
A version of Python's urllib.parse.urlencode() function that can operate on MultiValueDict and non-string values.
Undocumented
Value |
|
Parse a URL into 6 components: <scheme>://<netloc>/<path>;<params>?<query>#<fragment> Return a 6-tuple: (scheme, netloc, path, params, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes.