summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2010-11-18 23:12:57 -0800
committerBen Bangert <ben@groovie.org>2010-11-18 23:12:57 -0800
commit0f89f91a5bf4f26734235d01e81dffc77abba9c4 (patch)
tree56c0ef0525fc5ac32b286f9588dbe15b6bf7e661 /docs
parent16c510efd5b05c503350e378beb94a9cd6a5de7d (diff)
downloadpyramid-0f89f91a5bf4f26734235d01e81dffc77abba9c4.tar.gz
pyramid-0f89f91a5bf4f26734235d01e81dffc77abba9c4.tar.bz2
pyramid-0f89f91a5bf4f26734235d01e81dffc77abba9c4.zip
More colon references.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/urldispatch.rst14
1 files changed, 5 insertions, 9 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 1e5d84060..ae0ecf629 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -96,12 +96,8 @@ registry`. Here's an example:
.. versionchanged:: 1.0a4
Prior to 1.0a4, routes allow for a marker starting with a ``:``, for
- example::
-
- config.add_route('myroute', '/prefix/:one/:two', view=myview)
-
- Starting in 1.0a4, this style is deprecated in favor or ``{}`` usage
- which allows for additional functionality.
+ example ``/prefix/{one}``. Starting in 1.0a4, this style is deprecated
+ in favor or ``{}`` usage which allows for additional functionality.
.. index::
single: route configuration; view callable
@@ -280,9 +276,9 @@ replacement marker.
Segments must contain at least one character in order to match a
segment replacement marker. For example, for the URL ``/abc/``:
-- ``/abc/:foo`` will not match.
+- ``/abc/{foo}`` will not match.
-- ``/:foo/`` will match.
+- ``/{foo}/`` will match.
Note that values representing path segments matched with a
``:segment`` match will be url-unquoted and decoded from UTF-8 into
@@ -1246,7 +1242,7 @@ Such a ``factory`` might look like so:
if article == '1':
self.__acl__ = [ (Allow, 'editor', 'view') ]
-If the route ``archives/:article`` is matched, and the article number
+If the route ``archives/{article}`` is matched, and the article number
is ``1``, :app:`Pyramid` will generate an ``Article``
:term:`context` with an ACL on it that allows the ``editor`` principal
the ``view`` permission. Obviously you can do more generic things