From 6ba796afb03364219528fd28c24f56876a51954c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 19 Dec 2009 18:47:34 +0000 Subject: More docs. --- docs/narr/views.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs/narr/views.rst') diff --git a/docs/narr/views.rst b/docs/narr/views.rst index 01389cec0..678888872 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -555,6 +555,22 @@ path_info .. 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 (e.g. ``dotted.name.one dotted.name.two``, if used in + ZCML; Python dotted names to callables separated by spaces). Use + custom predicates when no set of predefined predicates do 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 view callable will be considered viable for a given + request. + + .. note:: This feature is new as of :mod:`repoze.bfg` 1.2. + .. _mapping_views_to_urls_using_a_decorator_section: View Configuration Using the ``@bfg_view`` Decorator -- cgit v1.2.3