summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-06-11 05:25:13 +0000
committerChris McDonough <chrism@agendaless.com>2009-06-11 05:25:13 +0000
commit2a258c73fccfea63592fe485a65bfca2aea83ef4 (patch)
tree813e7633e719a2da966870e9d9be587027ecdd9d
parent1ecdda6b64a498d0c04fb94a0c0ce0ec4d15d06c (diff)
downloadpyramid-2a258c73fccfea63592fe485a65bfca2aea83ef4.tar.gz
pyramid-2a258c73fccfea63592fe485a65bfca2aea83ef4.tar.bz2
pyramid-2a258c73fccfea63592fe485a65bfca2aea83ef4.zip
Document route_name (badly).
-rw-r--r--docs/narr/views.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index c55fc0937..6b8676386 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -215,6 +215,20 @@ request_type
called. See :ref:`view_request_types_section` for more information
about request types.
+route_name
+
+ *This attribute services an advanced feature that isn't often used
+ unless you want to perform traversal *after* a route has matched.*
+ This value must match the ``name`` of a ``<route>`` declaration (see
+ :ref:`urldispatch_chapter`) that must match before this view will be
+ called. The ``<route>`` declaration specifed by ``route_name`` must
+ exist in ZCML before the view that names the route
+ (XML-ordering-wise) . Note that the ``<route>`` declaration
+ referred to by ``route_name`` usually has a ``*traverse`` token in
+ the value of its ``path`` attribute, representing a part of the path
+ that will be used by traversal against the result of the route's
+ :term:`root factory`.
+
.. _mapping_views_to_urls_using_a_decorator_section:
Mapping Views to URLs Using a Decorator
@@ -295,6 +309,10 @@ If ``for_`` is not supplied, the interface
If ``permission`` is not supplied, no permission is registered for
this view (it's accessible by any caller).
+If ``route_name`` is supplied, the view will be invoked only if the
+named route matches. *This is an advanced feature, not often used by
+"civilians"*.
+
All arguments may be omitted. For example:
.. code-block:: python