MCPcopy
hub / github.com/django/django / get_script_prefix

Function get_script_prefix

django/urls/base.py:129–135  ·  view source on GitHub ↗

Return the currently active script prefix. Useful for client code that wishes to construct their own URLs manually (although accessing the request instance is normally going to be a lot cleaner).

()

Source from the content-addressed store, hash-verified

127
128
129def get_script_prefix():
130 """
131 Return the currently active script prefix. Useful for client code that
132 wishes to construct their own URLs manually (although accessing the request
133 instance is normally going to be a lot cleaner).
134 """
135 return getattr(_prefixes, "value", "/")
136
137
138def clear_script_prefix():

Callers 6

get_absolute_urlMethod · 0.90
add_preserved_filtersFunction · 0.90
process_responseMethod · 0.90
_add_script_prefixMethod · 0.90
enableMethod · 0.90
reverseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected