Browse Source

Refs #25582 -- Doc'd query and fragment arguments for reverse_lazy().

Adam Johnson 1 week ago
parent
commit
c70dbcf835
2 changed files with 8 additions and 4 deletions
  1. 5 1
      docs/ref/urlresolvers.txt
  2. 3 3
      docs/releases/5.2.txt

+ 5 - 1
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()``
 =============
 

+ 3 - 3
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
 ~~~~~~~~~