summaryrefslogtreecommitdiff
path: root/docs/narr/handlers.rst
diff options
context:
space:
mode:
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