summaryrefslogtreecommitdiff
path: root/docs/zcml
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-06-30 19:56:42 +0000
committerChris McDonough <chrism@agendaless.com>2010-06-30 19:56:42 +0000
commit62eaa2d1d4b195eac913cfa86992a3aaf1a315a2 (patch)
tree83a72770e3a963696b5ca8edb00ac0adf2669527 /docs/zcml
parent8b694da88f7f1b1aa244c72801b5effa43538056 (diff)
downloadpyramid-62eaa2d1d4b195eac913cfa86992a3aaf1a315a2.tar.gz
pyramid-62eaa2d1d4b195eac913cfa86992a3aaf1a315a2.tar.bz2
pyramid-62eaa2d1d4b195eac913cfa86992a3aaf1a315a2.zip
more documentation fallout from allowing predicates access to route matching information
Diffstat (limited to 'docs/zcml')
-rw-r--r--docs/zcml/route.rst20
1 files changed, 14 insertions, 6 deletions
diff --git a/docs/zcml/route.rst b/docs/zcml/route.rst
index 8bee3c14f..cf765e04f 100644
--- a/docs/zcml/route.rst
+++ b/docs/zcml/route.rst
@@ -103,20 +103,28 @@ 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
with predefined predicates as necessary. Each custom predicate
- callable should accept two arguments: ``context`` and ``request``
+ callable should accept two arguments: ``info`` and ``request``
and should return either ``True`` or ``False`` after doing arbitrary
- evaluation of the context and/or the request. If all callables
- return ``True``, the associated route will be considered viable for
- a given request. If any custom predicate returns ``False``, route
- matching continues. Note that the value ``context`` will always be
- ``None`` when passed to a custom route predicate.
+ evaluation of the info and/or the request. If all custom and
+ non-custom predicate callables return ``True`` the associated route
+ will be considered viable for a given request. If any predicate
+ callable returns ``False``, route matching continues. Note that the
+ value ``info`` passed to a custom route predicate is a dictionary
+ containing matching information; see :ref:`custom_route_predicates`
+ for more information about ``info``.
.. note:: This feature is new as of :mod:`repoze.bfg` 1.2.
+ .. note:: The ``info`` argument passed to a custom predicate in
+ versions prior to :mod:`repoze.bfg` 1.3 was always
+ ``None``.
+
+
``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