Undocumented
Exception |
|
Undocumented |
Function | escape |
Escape the unsafe characters from the path portion of a Uniform Resource Identifier (URI). |
Function | filepath |
Convert a file system path to a URI portion that is suitable for inclusion in a URL. |
Function | force |
Similar to smart_bytes, except that lazy instances are resolved to strings, rather than kept as lazy objects. |
Function | force |
Similar to smart_str(), except that lazy instances are resolved to strings, rather than kept as lazy objects. |
Function | get |
The encoding for the character type functions. Fallback to 'ascii' if the #encoding is unsupported by Python or could not be determined. See tickets #10335 and #5846. |
Function | iri |
Convert an Internationalized Resource Identifier (IRI) portion to a URI portion that is suitable for inclusion in a URL. |
Function | is |
Determine if the object instance is of a protected type. |
Function | punycode |
Return the Punycode of the given domain if it's non-ASCII. |
Function | repercent |
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. |
Function | smart |
Return a bytestring version of 's', encoded as specified in 'encoding'. |
Function | smart |
Return a string representing 's'. Treat bytestrings using the 'encoding' codec. |
Function | uri |
Convert a Uniform Resource Identifier(URI) into an Internationalized Resource Identifier(IRI). |
Constant | DEFAULT |
Undocumented |
Constant | _PROTECTED |
Undocumented |
Variable | _ascii |
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.
The encoding for the character type functions. Fallback to 'ascii' if the #encoding is unsupported by Python or could not be determined. See tickets #10335 and #5846.
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).
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.
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/').
Undocumented
Value |
|