MCPcopy
hub / github.com/django/django / normalize

Method normalize

django/test/testcases.py:536–541  ·  view source on GitHub ↗

Sort the URL's query string parameters.

(url)

Source from the content-addressed store, hash-verified

534 """
535
536 def normalize(url):
537 """Sort the URL's query string parameters."""
538 url = str(url) # Coerce reverse_lazy() URLs.
539 scheme, netloc, path, query, fragment = urlsplit(url)
540 query_parts = sorted(parse_qsl(query))
541 return urlunsplit((scheme, netloc, path, urlencode(query_parts), fragment))
542
543 if msg_prefix:
544 msg_prefix += ": "

Callers 10

charsMethod · 0.45
slugifyFunction · 0.45
sanitize_separatorsFunction · 0.45
test_normalizeMethod · 0.45
test_emptyMethod · 0.45
test_escapeMethod · 0.45
test_group_positionalMethod · 0.45
test_group_namedMethod · 0.45

Calls 1

urlencodeFunction · 0.50

Tested by

no test coverage detected