Skip to content

Commit

Permalink
[3.0.x] Fixed #31069, Refs #26431 -- Doc'd RegexPattern behavior chan…
Browse files Browse the repository at this point in the history
…ge in passing optional named groups in Django 3.0.

Backport of 9736137 from master
  • Loading branch information
hramezani authored and felixxm committed Dec 12, 2019
1 parent 79c92fc commit 6cb3041
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/releases/3.0.txt
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions docs/topics/http/urls.txt
Expand Up @@ -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.
Expand Down

0 comments on commit 6cb3041

Please sign in to comment.