summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-12-30 17:55:12 -0500
committerTim Graham <timograham@gmail.com>2013-12-30 17:57:47 -0500
commitf20da282972628daed1d792104500600d233d897 (patch)
treee41ea6a88624f83f536a0f82f38d82a1e77304ab
parent3cf9ba5fa31083b17c7363e512d365bac0f57c24 (diff)
[1.5.x] Fixed #21708 -- Added some headings to separate unrelated topics.
Thanks ashley at ashleymills.com for the suggestion. Backport of 270f7e2167 from master
-rw-r--r--docs/topics/http/urls.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
index a4c8561c5d..90a3f0798f 100644
--- a/docs/topics/http/urls.txt
+++ b/docs/topics/http/urls.txt
@@ -177,8 +177,8 @@ The URLconf doesn't look at the request method. In other words, all request
methods -- ``POST``, ``GET``, ``HEAD``, etc. -- will be routed to the same
function for the same URL.
-Notes on capturing text in URLs
-===============================
+Captured arguments are always strings
+=====================================
Each captured argument is sent to the view as a plain Python string, regardless
of what sort of match the regular expression makes. For example, in this
@@ -189,6 +189,9 @@ URLconf line::
...the ``year`` argument to ``news.views.year_archive()`` will be a string, not
an integer, even though the ``\d{4}`` will only match integer strings.
+Specifying defaults for view arguments
+======================================
+
A convenient trick is to specify default parameters for your views' arguments.
Here's an example URLconf and view::