summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Graham <timograham@gmail.com>2012-02-12 17:10:31 +0000
committerTimo Graham <timograham@gmail.com>2012-02-12 17:10:31 +0000
commit2df1847c9b59b183bb3331fb19a7f76c72358edf (patch)
treebf77bbc3ff7c9cc0546ee27c85cf2e3c419800ed
parentd1f85555008f4444927c92ea3d9b1286079ef650 (diff)
Fixed #16653 - Added example of kwargs support for resolve(); thanks krzysiumed for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/topics/http/urls.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
index 29ee851f33..56a95c7a1d 100644
--- a/docs/topics/http/urls.txt
+++ b/docs/topics/http/urls.txt
@@ -846,6 +846,11 @@ 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.