diff options
author | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2023-04-06 13:01:26 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-04-06 13:02:00 +0200 |
commit | e34a54a36e2d7b35e8998fe60462e93a1a5424cf (patch) | |
tree | 7eb5358ceb478bde26ea44dcd8e919f7e3223e15 | |
parent | 32cfa73c6a7264a0b6365cc380ca0b257b6fc07a (diff) | |
download | django-e34a54a36e2d7b35e8998fe60462e93a1a5424cf.tar.gz |
[4.2.x] Refs #34028 -- Doc'd that get_script_prefix() cannot be used outside of the request-response cycle.
Backport of bdf59bff657975e577b86b194b39ec2f77983d2b from main
-rw-r--r-- | docs/ref/urlresolvers.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/ref/urlresolvers.txt b/docs/ref/urlresolvers.txt index 5104125a46..bcca3ae299 100644 --- a/docs/ref/urlresolvers.txt +++ b/docs/ref/urlresolvers.txt @@ -240,3 +240,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 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 ``"/"``. + +.. warning:: + + This function **cannot** be used outside of the request-response cycle + since it relies on values initialized during that cycle. |