Fixed #15695 -- Added ResolverMatch to the request object.

This commit is contained in:
Florian Apolloner 2012-09-27 15:06:58 +02:00
parent 44767f2caf
commit b946db5241
6 changed files with 29 additions and 3 deletions

View file

@ -192,6 +192,17 @@ All attributes should be considered read-only, unless stated otherwise below.
URLconf for the current request, overriding the :setting:`ROOT_URLCONF`
setting. See :ref:`how-django-processes-a-request` for details.
.. attribute:: HttpRequest.resolver_match
.. versionadded:: 1.5
An instance of :class:`~django.core.urlresolvers.ResolverMatch` representing
the resolved url. This attribute is only set after url resolving took place,
which means it's available in all views but not in middleware methods which
are executed before url resolving takes place (like ``process_request``, you
can use ``process_view`` instead).
Methods
-------