diff options
| author | Adam Johnson <me@adamj.eu> | 2025-03-12 12:37:30 +0000 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-03-12 16:41:44 +0100 |
| commit | c70dbcf8358ca7ff34e76b11dae0740284663911 (patch) | |
| tree | 3ba309d4c649a7a310973ac11a26e62672565fd5 /docs | |
| parent | 955b7c6ba105b328f387a9d63540dbabd4a05828 (diff) | |
Refs #25582 -- Doc'd query and fragment arguments for reverse_lazy().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/urlresolvers.txt | 6 | ||||
| -rw-r--r-- | docs/releases/5.2.txt | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/docs/ref/urlresolvers.txt b/docs/ref/urlresolvers.txt index 0c26f9578a..ac0f74cdfc 100644 --- a/docs/ref/urlresolvers.txt +++ b/docs/ref/urlresolvers.txt @@ -132,7 +132,7 @@ For example: A lazily evaluated version of `reverse()`_. -.. function:: reverse_lazy(viewname, urlconf=None, args=None, kwargs=None, current_app=None) +.. function:: reverse_lazy(viewname, urlconf=None, args=None, kwargs=None, current_app=None, *, query=None, fragment=None) It is useful for when you need to use a URL reversal before your project's URLConf is loaded. Some common cases where this function is necessary are: @@ -147,6 +147,10 @@ URLConf is loaded. Some common cases where this function is necessary are: * providing a reversed URL as a default value for a parameter in a function's signature. +.. versionchanged:: 5.2 + + The ``query`` and ``fragment`` arguments were added. + ``resolve()`` ============= diff --git a/docs/releases/5.2.txt b/docs/releases/5.2.txt index d5dc623a5d..0ba2e508b8 100644 --- a/docs/releases/5.2.txt +++ b/docs/releases/5.2.txt @@ -371,9 +371,9 @@ Tests URLs ~~~~ -* :func:`~django.urls.reverse` now accepts ``query`` and ``fragment`` keyword - arguments, allowing the addition of a query string and/or fragment identifier - in the generated URL, respectively. +* :func:`~django.urls.reverse` and :func:`~django.urls.reverse_lazy` now accept + ``query`` and ``fragment`` keyword arguments, allowing the addition of a + query string and/or fragment identifier in the generated URL, respectively. Utilities ~~~~~~~~~ |
