diff options
| author | Benjamin Wohlwend <piquadrat@gmail.com> | 2017-11-02 17:35:41 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-12-06 18:05:40 -0500 |
| commit | 79c196cfb287893aadc6b0e74603ffde1512170e (patch) | |
| tree | 43133516a8b336d36ac3f9bf202d53cd731bbe44 /docs | |
| parent | ad191d9e011f37d79a7f2df3da881b06539aaaea (diff) | |
Fixed #28766 -- Added ResolverMatch.route.
Co-Authored-By: Xavier Fernandez <xavier.fernandez@polyconseil.fr>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/urlresolvers.txt | 9 | ||||
| -rw-r--r-- | docs/releases/2.2.txt | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/ref/urlresolvers.txt b/docs/ref/urlresolvers.txt index 0afdc4430f..5da5426923 100644 --- a/docs/ref/urlresolvers.txt +++ b/docs/ref/urlresolvers.txt @@ -130,6 +130,15 @@ If the URL does not resolve, the function raises a The name of the URL pattern that matches the URL. + .. attribute:: ResolverMatch.route + + .. versionadded:: 2.2 + + The route of the matching URL pattern. + + For example, if ``path('users/<id>/', ...)`` is the matching pattern, + ``route`` will contain ``'users/<id>/'``. + .. attribute:: ResolverMatch.app_name The application namespace for the URL pattern that matches the diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt index 93a4a68994..f785d109ce 100644 --- a/docs/releases/2.2.txt +++ b/docs/releases/2.2.txt @@ -268,7 +268,8 @@ Tests URLs ~~~~ -* ... +* The new :attr:`.ResolverMatch.route` attribute stores the route of the + matching URL pattern. Validators ~~~~~~~~~~ |
