Skip to main content

quote

Ensure that primary key values do not confuse the admin URLs by escaping any '/', '_' and ':' and similarly problematic characters. Similar to urllib.parse.quote(), except that the quoting is slightly different so that it doesn't get automatically unquoted by the web browser.

def quote(
s: string
) - > string

Ensure that primary key values do not confuse the admin URLs by escaping any '/', '_' and ':' and similarly problematic characters. Similar to urllib.parse.quote(), except that the quoting is slightly different so that it doesn't get automatically unquoted by the web browser.

Parameters

NameTypeDescription
sstringThe primary key value or string to be escaped for safe inclusion in admin URLs.

Returns

TypeDescription
stringThe escaped string where problematic characters are replaced according to the translation map, or the original value if not a string.