mirror of
https://github.com/django/django.git
synced 2025-09-19 00:40:11 +00:00
Refs #34028 -- Doc'd that get_script_prefix() cannot be used outside of the request-response cycle.
This commit is contained in:
parent
38e63c9e61
commit
bdf59bff65
1 changed files with 5 additions and 0 deletions
|
@ -236,3 +236,8 @@ its web server (normally, :func:`~django.urls.reverse` takes care of this for
|
||||||
you). In that case, you can call ``get_script_prefix()``, which will return
|
you). In that case, you can call ``get_script_prefix()``, which will return
|
||||||
the script prefix portion of the URL for your Django project. If your Django
|
the script prefix portion of the URL for your Django project. If your Django
|
||||||
project is at the root of its web server, this is always ``"/"``.
|
project is at the root of its web server, this is always ``"/"``.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This function **cannot** be used outside of the request-response cycle
|
||||||
|
since it relies on values initialized during that cycle.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue