Undocumented
Function | escape_uri_path |
Escape the unsafe characters from the path portion of a Uniform Resource Identifier (URI). |
Function | filepath_to_uri |
Convert a file system path to a URI portion that is suitable for inclusion in a URL. |
Function | force_bytes |
Similar to smart_bytes, except that lazy instances are resolved to strings, rather than kept as lazy objects. |
Function | force_str |
Similar to smart_str(), except that lazy instances are resolved to strings, rather than kept as lazy objects. |
Function | iri_to_uri |
Convert an Internationalized Resource Identifier (IRI) portion to a URI portion that is suitable for inclusion in a URL. |
Function | is_protected_type |
Determine if the object instance is of a protected type. |
Function | smart_bytes |
Return a bytestring version of 's', encoded as specified in 'encoding'. |
Function | smart_str |
Return a string representing 's'. Treat bytestrings using the 'encoding' codec. |
Function | uri_to_iri |
Convert a Uniform Resource Identifier(URI) into an Internationalized Resource Identifier(IRI). |
Constant | DEFAULT_LOCALE_ENCODING |
Undocumented |
Class | DjangoUnicodeDecodeError |
Undocumented |
Function | get_system_encoding |
The encoding of the default system locale. Fallback to 'ascii' if the #encoding is unsupported by Python or could not be determined. See tickets #10335 and #5846. |
Function | punycode |
Return the Punycode of the given domain if it's non-ASCII. |
Function | repercent_broken_unicode |
As per section 3.2 of RFC 3987, step three of converting a URI into an IRI, repercent-encode any octet produced that is not part of a strictly legal UTF-8 octet sequence. |
Constant | _PROTECTED_TYPES |
Undocumented |
Variable | _ascii_ranges |
Undocumented |
Variable | _hexdig |
Undocumented |
Variable | _hextobyte |
Undocumented |
Convert a file system path to a URI portion that is suitable for inclusion in a URL.
Encode certain chars that would normally be recognized as special chars for URIs. Do not encode the ' character, as it is a valid character within URIs. See the encodeURIComponent() JavaScript function for details.
Similar to smart_bytes, except that lazy instances are resolved to strings, rather than kept as lazy objects.
If strings_only is True, don't convert (some) non-string-like objects.
Similar to smart_str(), except that lazy instances are resolved to strings, rather than kept as lazy objects.
If strings_only is True, don't convert (some) non-string-like objects.
Convert an Internationalized Resource Identifier (IRI) portion to a URI portion that is suitable for inclusion in a URL.
This is the algorithm from section 3.1 of RFC 3987, slightly simplified since the input is assumed to be a string rather than an arbitrary byte stream.
Take an IRI (string or UTF-8 bytes, e.g. '/I ♥ Django/' or b'/I ⥠Django/') and return a string containing the encoded result with ASCII chars only (e.g. '/I%20%E2%99%A5%20Django/').
Determine if the object instance is of a protected type.
Objects of protected types are preserved as-is when passed to force_str(strings_only=True).
Return a bytestring version of 's', encoded as specified in 'encoding'.
If strings_only is True, don't convert (some) non-string-like objects.
Return a string representing 's'. Treat bytestrings using the 'encoding' codec.
If strings_only is True, don't convert (some) non-string-like objects.
Convert a Uniform Resource Identifier(URI) into an Internationalized Resource Identifier(IRI).
This is the algorithm from section 3.2 of RFC 3987, excluding step 4.
Take an URI in ASCII bytes (e.g. '/I%20%E2%99%A5%20Django/') and return a string containing the encoded result (e.g. '/I%20♥%20Django/').