diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-06-30 19:56:42 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-06-30 19:56:42 +0000 |
| commit | 62eaa2d1d4b195eac913cfa86992a3aaf1a315a2 (patch) | |
| tree | 83a72770e3a963696b5ca8edb00ac0adf2669527 /repoze | |
| parent | 8b694da88f7f1b1aa244c72801b5effa43538056 (diff) | |
| download | pyramid-62eaa2d1d4b195eac913cfa86992a3aaf1a315a2.tar.gz pyramid-62eaa2d1d4b195eac913cfa86992a3aaf1a315a2.tar.bz2 pyramid-62eaa2d1d4b195eac913cfa86992a3aaf1a315a2.zip | |
more documentation fallout from allowing predicates access to route matching information
Diffstat (limited to 'repoze')
| -rw-r--r-- | repoze/bfg/configuration.py | 25 |
1 files changed, 15 insertions, 10 deletions
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 |
