Skip to content

Commit

Permalink
Fixed #16653 - Added example of kwargs support for resolve(); thanks …
Browse files Browse the repository at this point in the history
…krzysiumed for the patch.

Backport of r17517 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@17518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
timgraham committed Feb 12, 2012
1 parent f202387 commit ce9916a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/topics/http/urls.txt
Expand Up @@ -818,6 +818,13 @@ This ``current_app`` argument is used as a hint to resolve application
namespaces into URLs on specific application instances, according to the namespaces into URLs on specific application instances, according to the
:ref:`namespaced URL resolution strategy <topics-http-reversing-url-namespaces>`. :ref:`namespaced URL resolution strategy <topics-http-reversing-url-namespaces>`.


You can use ``kwargs`` instead of ``args``, for example::

>>> reverse('admin:app_list', kwargs={'app_label': 'auth'})
'/admin/auth/'

``args`` and ``kwargs`` cannot be passed to ``reverse()`` at the same time.

.. admonition:: Make sure your views are all correct. .. admonition:: Make sure your views are all correct.


As part of working out which URL names map to which patterns, the As part of working out which URL names map to which patterns, the
Expand Down

0 comments on commit ce9916a

Please sign in to comment.