From 62eaa2d1d4b195eac913cfa86992a3aaf1a315a2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Jun 2010 19:56:42 +0000 Subject: more documentation fallout from allowing predicates access to route matching information --- repoze/bfg/configuration.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'repoze') diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index 546a6978b..937a7c5d2 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -932,8 +932,7 @@ class Configurator(object): request_param=None, custom_predicates=(), view_permission=None, - renderer=None, - view_renderer=None, + renderer=None, view_renderer=None, view_context=None, view_attr=None, use_global_views=False, @@ -1051,17 +1050,23 @@ class Configurator(object): 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`` 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. + ``info`` and ``request`` and should return either ``True`` + or ``False`` after doing arbitrary 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-Related Arguments view -- cgit v1.2.3