diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2024-10-07 10:07:39 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-10-07 11:17:10 +0200 |
| commit | d876be794f59fd37c8edc33ecde4577d820a9c75 (patch) | |
| tree | 3327cb5b361d8134bae4b9358c65c4a43e62e3cb | |
| parent | c334c1a8ff4579cdb1dd77cce8da747070ac9fc4 (diff) | |
Fixed #35807 -- Mentioned async case for internal get/set urlconf helpers.
| -rw-r--r-- | django/urls/base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/django/urls/base.py b/django/urls/base.py index 753779c75b..bb40ba2224 100644 --- a/django/urls/base.py +++ b/django/urls/base.py @@ -127,8 +127,9 @@ def clear_script_prefix(): def set_urlconf(urlconf_name): """ - Set the URLconf for the current thread (overriding the default one in - settings). If urlconf_name is None, revert back to the default. + Set the URLconf for the current thread or asyncio task (overriding the + default one in settings). If urlconf_name is None, revert back to the + default. """ if urlconf_name: _urlconfs.value = urlconf_name @@ -139,8 +140,8 @@ def set_urlconf(urlconf_name): def get_urlconf(default=None): """ - Return the root URLconf to use for the current thread if it has been - changed from the default one. + Return the root URLconf to use for the current thread or asyncio task if it + has been changed from the default one. """ return getattr(_urlconfs, "value", default) |
