summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-03-02 23:08:04 -0500
committerChris McDonough <chrism@plope.com>2011-03-02 23:08:04 -0500
commit7edede0f2b68098c8ed1e4c82b14ac3a6a76062a (patch)
tree934454daef9609661a2ade3fd13d1b15a3011331 /docs/narr
parent115c7137326a2739525fd53b96d2df42d3f0930b (diff)
downloadpyramid-7edede0f2b68098c8ed1e4c82b14ac3a6a76062a.tar.gz
pyramid-7edede0f2b68098c8ed1e4c82b14ac3a6a76062a.tar.bz2
pyramid-7edede0f2b68098c8ed1e4c82b14ac3a6a76062a.zip
Closes #125
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/urldispatch.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index cab5f85fa..ca8fe84f3 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -430,7 +430,7 @@ For example:
num_one_two_or_three = any_of('num', 'one', 'two', 'three')
- config.add_route('num', '/{num}',
+ config.add_route('route_to_num', '/{num}',
custom_predicates=(num_one_two_or_three,))
The above ``any_of`` function generates a predicate which ensures that the
@@ -461,7 +461,7 @@ instance, a predicate might do some type conversion of values:
ymd_to_int = integers('year', 'month', 'day')
- config.add_route('num', '/{year}/{month}/{day}',
+ config.add_route('ymd', '/{year}/{month}/{day}',
custom_predicates=(ymd_to_int,))
Note that a conversion predicate is still a predicate so it must return
@@ -484,7 +484,7 @@ expressions specifying requirements for that marker. For instance:
ymd_to_int = integers('year', 'month', 'day')
- config.add_route('num', '/{year:\d+}/{month:\d+}/{day:\d+}',
+ config.add_route('ymd', '/{year:\d+}/{month:\d+}/{day:\d+}',
custom_predicates=(ymd_to_int,))
Now the try/except is no longer needed because the route will not match at