Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.5.x] Fixed #21708 -- Added some headings to separate unrelated top…

…ics.

Thanks ashley at ashleymills.com for the suggestion.

Backport of 270f7e2 from master
  • Loading branch information...
commit f20da282972628daed1d792104500600d233d897 1 parent 3cf9ba5
@timgraham timgraham authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 docs/topics/http/urls.txt
View
7 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::
Please sign in to comment.
Something went wrong with that request. Please try again.