summaryrefslogtreecommitdiff
path: root/docs/narr/handlers.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-11-20 15:56:58 -0500
committerChris McDonough <chrism@plope.com>2010-11-20 15:56:58 -0500
commitdf3f64ac77304db5d95a1cd33f07320a458b278a (patch)
treea22b9b6ce15a6de8cf5de16a51bdf32950c60267 /docs/narr/handlers.rst
parent35ce2adb609bfb3db346bc8cc937d13a0d2dddcd (diff)
downloadpyramid-df3f64ac77304db5d95a1cd33f07320a458b278a.tar.gz
pyramid-df3f64ac77304db5d95a1cd33f07320a458b278a.tar.bz2
pyramid-df3f64ac77304db5d95a1cd33f07320a458b278a.zip
convert stray references to colon routing syntax to squiggly syntax
Diffstat (limited to 'docs/narr/handlers.rst')
-rw-r--r--docs/narr/handlers.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/narr/handlers.rst b/docs/narr/handlers.rst
index b8e7b5d9b..022f27115 100644
--- a/docs/narr/handlers.rst
+++ b/docs/narr/handlers.rst
@@ -59,11 +59,11 @@ be performed in order to register it with the system:
.. code-block:: python
- config.add_handler('hello', '/hello/:action', handler=Hello)
+ config.add_handler('hello', '/hello/{action}', handler=Hello)
This example will result in a route being added for the pattern
-``/hello/:action``, each method of the ``Hello`` class will then be examined
-to register the views. The value of ``:action`` in the route pattern will be
+``/hello/{action}``, each method of the ``Hello`` class will then be examined
+to register the views. The value of ``{action}`` in the route pattern will be
used to determine which view should be called, and each view in the class will
be setup with a view predicate that requires a specific ``action`` name.
@@ -98,7 +98,7 @@ For example:
.. code-block:: python
- config.add_handler('hello', '/hello/:action',
+ config.add_handler('hello', '/hello/{action}',
handler='mypackage.handlers:MyHandler')
In larger applications, it is advised to use a :term:`resource specification`
@@ -219,7 +219,7 @@ Example:
return {}
# in the config
- config.add_handler('hello', '/hello/:action', handler=Hello)
+ config.add_handler('hello', '/hello/{action}', handler=Hello)
With this configuration, the url ``/hello/home`` will find a view configuration
that results in calling the ``show_template`` method, then rendering the