summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2019-12-11 11:57:27 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-12-12 14:49:13 +0100
commit6cb30414bc0f83b49afc4cae76d4af5656effe9a (patch)
tree6b5e561e9d9d593524aca659648fbc9e8a487b19
parent79c92fc7b69dc62753cde4b5a3be5549fe007f0d (diff)
[3.0.x] Fixed #31069, Refs #26431 -- Doc'd RegexPattern behavior change in passing optional named groups in Django 3.0.
Backport of 9736137cdc4b7528a0aca17415dc9798660eed81 from master
-rw-r--r--docs/releases/3.0.txt4
-rw-r--r--docs/topics/http/urls.txt9
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt
index 92b15d75cb..435755f732 100644
--- a/docs/releases/3.0.txt
+++ b/docs/releases/3.0.txt
@@ -548,6 +548,10 @@ Miscellaneous
* Support for ``sqlparse`` < 0.2.2 is removed.
+* ``RegexPattern``, used by :func:`~django.urls.re_path`, no longer returns
+ keyword arguments with ``None`` values to be passed to the view for the
+ optional named groups that are missing.
+
.. _deprecated-features-3.0:
Features deprecated in 3.0
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
index 5c1540b809..a850e3c35f 100644
--- a/docs/topics/http/urls.txt
+++ b/docs/topics/http/urls.txt
@@ -56,10 +56,15 @@ algorithm the system follows to determine which Python code to execute:
* If the matched URL pattern contained no named groups, then the
matches from the regular expression are provided as positional arguments.
* The keyword arguments are made up of any named parts matched by the
- path expression, overridden by any arguments specified in the optional
- ``kwargs`` argument to :func:`django.urls.path` or
+ path expression that are provided, overridden by any arguments specified
+ in the optional ``kwargs`` argument to :func:`django.urls.path` or
:func:`django.urls.re_path`.
+ .. versionchanged:: 3.0
+
+ In older versions, the keyword arguments with ``None`` values are
+ made up also for not provided named parts.
+
#. If no URL pattern matches, or if an exception is raised during any
point in this process, Django invokes an appropriate
error-handling view. See `Error handling`_ below.