summaryrefslogtreecommitdiff
path: root/docs/topics/http
diff options
context:
space:
mode:
authorTim Martin <tim@asymptotic.co.uk>2014-03-25 21:06:54 +0000
committerTim Graham <timograham@gmail.com>2014-03-27 07:02:02 -0400
commite2e773c04abeab04866eac14c0040ef3aa653e1b (patch)
treea510301a6f8e709564b8c3d1fde6d59a703d6efc /docs/topics/http
parent0134d00be5446d9ae51a1a36e4e10289037f8782 (diff)
[1.7.x] Fixed #21941 -- Documented the kwargs param of django.conf.urls.url().
Thanks cjerdonek for the report. Backport of a779757706 from master
Diffstat (limited to 'docs/topics/http')
-rw-r--r--docs/topics/http/urls.txt16
1 files changed, 11 insertions, 5 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
index 36a43ed704..52ef88b113 100644
--- a/docs/topics/http/urls.txt
+++ b/docs/topics/http/urls.txt
@@ -51,11 +51,17 @@ algorithm the system follows to determine which Python code to execute:
3. Django runs through each URL pattern, in order, and stops at the first
one that matches the requested URL.
-4. Once one of the regexes matches, Django imports and calls the given
- view, which is a simple Python function (or a :doc:`class based view
- </topics/class-based-views/index>`). The view gets passed an
- :class:`~django.http.HttpRequest` as its first argument and any values
- captured in the regex as remaining arguments.
+4. Once one of the regexes matches, Django imports and calls the given view,
+ which is a simple Python function (or a :doc:`class based view
+ </topics/class-based-views/index>`). The view gets passed the following
+ arguments:
+
+ * An instance of :class:`~django.http.HttpRequest`.
+ * If the matched regular expression returned no named groups, then the
+ matches from the regular expression are provided as positional arguments.
+ * The keyword arguments are made up of any named groups matched by the
+ regular expression, overridden by any arguments specified in the optional
+ ``kwargs`` argument to :func:`django.conf.urls.url`.
5. If no regex matches, or if an exception is raised during any
point in this process, Django invokes an appropriate