summaryrefslogtreecommitdiff
path: root/docs/zcml/route.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-01-19 02:08:12 +0000
committerChris McDonough <chrism@agendaless.com>2010-01-19 02:08:12 +0000
commit37bcb77a86b73151c781d8b0b8c2d3d4e14f5fe7 (patch)
treeb59bda2b0e5151ffe17b39f6fa6e82d6409b333e /docs/zcml/route.rst
parent56971c5db0ba61bdc270da8e72c35708f93d9e11 (diff)
downloadpyramid-37bcb77a86b73151c781d8b0b8c2d3d4e14f5fe7.tar.gz
pyramid-37bcb77a86b73151c781d8b0b8c2d3d4e14f5fe7.tar.bz2
pyramid-37bcb77a86b73151c781d8b0b8c2d3d4e14f5fe7.zip
Bug Fixes
--------- - When the ``Configurator`` is passed an instance of ``zope.component.registry.Components`` as a ``registry`` constructor argument, fix the instance up to have the attributes we expect of an instance of ``repoze.bfg.registry.Registry`` when ``setup_registry`` is called. This makes it possible to use the global Zope component registry as a BFG application registry. Documentation ------------- - Change renderings of ZCML directive documentation. - Add a narrative documentation chapter: "Using the Zope Component Architecture in ``repoze.bfg``"
Diffstat (limited to 'docs/zcml/route.rst')
-rw-r--r--docs/zcml/route.rst17
1 files changed, 0 insertions, 17 deletions
diff --git a/docs/zcml/route.rst b/docs/zcml/route.rst
index d3181bdf6..bb842819d 100644
--- a/docs/zcml/route.rst
+++ b/docs/zcml/route.rst
@@ -10,32 +10,27 @@ Attributes
~~~~~~~~~~
``path``
-
The path of the route e.g. ``ideas/:idea``. This attribute is
required. See :ref:`route_path_pattern_syntax` for information
about the syntax of route paths.
``name``
-
The name of the route, e.g. ``myroute``. This attribute is
required. It must be unique among all defined routes in a given
configuration.
``factory``
-
The :term:`dotted Python name` to a function that will generate a
:mod:`repoze.bfg` context object when this route matches.
e.g. ``mypackage.models.MyFactoryClass``. If this argument is not
specified, a default root factory will be used.
``view``
-
The :term:`dotted Python name` to a function that will be used as a
view callable when this route matches.
e.g. ``mypackage.views.my_view``.
``xhr``
-
This value should be either ``True`` or ``False``. If this value is
specified and is ``True``, the :term:`request` must possess an
``HTTP_X_REQUESTED_WITH`` (aka ``X-Requested-With``) header for this
@@ -46,7 +41,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``request_method``
-
A string representing an HTTP method name, e.g. ``GET``, ``POST``,
``HEAD``, ``DELETE``, ``PUT``. If this argument is not specified,
this route will match if the request has *any* request method. If
@@ -55,7 +49,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``path_info``
-
The value of this attribute represents a regular expression pattern
that will be tested against the ``PATH_INFO`` WSGI environment
variable. If the regex matches, this predicate will be true. If
@@ -64,7 +57,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``request_param``
-
This value can be any string. A view declaration with this
attribute ensures that the associated route will only match when the
request has a key in the ``request.params`` dictionary (an HTTP
@@ -79,7 +71,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``header``
-
The value of this attribute represents an HTTP header name or a
header name/value pair. If the value contains a ``:`` (colon), it
will be considered a name/value pair (e.g. ``User-Agent:Mozilla/.*``
@@ -100,7 +91,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``accept``
-
The value of this attribute represents a match query for one or more
mimetypes in the ``Accept`` HTTP request header. If this value is
specified, it must be in one of the following forms: a mimetype
@@ -113,7 +103,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``custom_predicates``
-
This value should be a sequence of references to custom predicate
callables. Use custom predicates when no set of predefined
predicates does what you need. Custom predicates can be combined
@@ -129,7 +118,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.2.
``view_context``
-
The :term:`dotted Python name` to a class or an interface that the
:term:`context` of the view should match for the view named by the
route to be used. This attribute is only useful if the ``view``
@@ -143,7 +131,6 @@ Attributes
these are valid older spellings.
``view_permission``
-
The permission name required to invoke the view associated with this
route. e.g. ``edit``. (see :ref:`using_security_with_urldispatch`
for more information about permissions).
@@ -154,7 +141,6 @@ Attributes
This attribute can also be spelled as ``permission``.
``view_renderer``
-
This is either a single string term (e.g. ``json``) or a string
implying a path or :term:`resource specification`
(e.g. ``templates/views.pt``). If the renderer value is a single
@@ -177,7 +163,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``view_request_type``
-
A :term:`dotted Python name` to an interface representing a
:term:`request type`. If this argument is not specified, any
request type will be considered a match for the view associated with
@@ -189,7 +174,6 @@ Attributes
This attribute can also be spelled as ``request_type``.
``view_containment``
-
This value should be a :term:`dotted Python name` string
representing the class that a graph traversal parent object of the
:term:`context` must be an instance of (or :term:`interface` that a
@@ -204,7 +188,6 @@ Attributes
.. note:: This feature is new as of :mod:`repoze.bfg` 1.1.
``view_attr``
-
The view machinery defaults to using the ``__call__`` method of the
view callable (or the function itself, if the view callable is a
function) to obtain a response dictionary. The ``attr`` value allows