summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-12-06 08:56:23 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-12-06 08:56:23 -0700
commiteb7a83dd32a088b05013075978194398ee036ea0 (patch)
tree3c8aac40c1c470e03e144cd041d57547bdd6ea2a /docs
parent2b2c7b888d96d5b52883d1b47d3c20aa887370bb (diff)
downloadpyramid-eb7a83dd32a088b05013075978194398ee036ea0.tar.gz
pyramid-eb7a83dd32a088b05013075978194398ee036ea0.tar.bz2
pyramid-eb7a83dd32a088b05013075978194398ee036ea0.zip
clarify paragraph about multiple action decorators for one view handler method
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/handlers.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/narr/handlers.rst b/docs/narr/handlers.rst
index 4cc996047..d28c9d120 100644
--- a/docs/narr/handlers.rst
+++ b/docs/narr/handlers.rst
@@ -169,7 +169,7 @@ Action Decorator
----------------
The :class:`~pyramid.view.action` decorator registers view configuration
-information on the handler method which is used by
+information on the handler method, which is used by
:meth:`~pyramid.configuration.Configurator.add_handler` to setup the view
configuration.
@@ -204,10 +204,11 @@ Example:
This will register two views that require the ``action`` to be ``index``, with
the additional view predicate requiring a specific request method.
-When a method is decorated multiple times with :class:`~pyramid.view.action`,
-a view configuration will be registered for each call, with the view callable
-being the method decorated. Used with a combination of ``name``, multiple
-URL's can result in different template renderings with the same data.
+It can be useful to decorate a single method multiple times with
+:class:`~pyramid.view.action`. Each action decorator will register a new view
+for the method. By specifying different names and renderers for each action,
+the same view logic can be exposed and rendered differently on multiple
+URLs.
Example: