diff options
| author | Timo Graham <timograham@gmail.com> | 2012-02-12 17:16:37 +0000 |
|---|---|---|
| committer | Timo Graham <timograham@gmail.com> | 2012-02-12 17:16:37 +0000 |
| commit | ce9916a2c80b52b327b010c55edb9ae28ccb6b8a (patch) | |
| tree | 969e991c81a01f33753bfa0edfb4f4e081e9fa5c | |
| parent | f202387e6c807878b4fc80e0efa83a488e157b7a (diff) | |
Fixed #16653 - Added example of kwargs support for resolve(); thanks 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
| -rw-r--r-- | docs/topics/http/urls.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index 7a0e7243e8..8be72d243b 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -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 :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. As part of working out which URL names map to which patterns, the |
