summaryrefslogtreecommitdiff
path: root/docs/whatsnew-1.3.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/whatsnew-1.3.rst')
-rw-r--r--docs/whatsnew-1.3.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/whatsnew-1.3.rst b/docs/whatsnew-1.3.rst
index b02ade4c3..17be94c9d 100644
--- a/docs/whatsnew-1.3.rst
+++ b/docs/whatsnew-1.3.rst
@@ -125,6 +125,21 @@ Minor Feature Additions
conventions as objects that can be supplied directly to BFG as a
view callable.
+- Prior to 1.3, a *route predicate* had no access to route pattern
+ matching information and had no way to know which route was matched.
+ Now, each of the predicate callables fed to the
+ ``custom_predicates`` argument of
+ :meth:`repoze.bfg.configuration.Configurator.add_route` or the
+ ``custom_predicates`` ZCML attribute can be a callable accepting two
+ arguments. The first argument passed to a custom predicate is a
+ dictionary conventionally named ``info``. The second argument is
+ the current :term:`request` object. The ``info`` dictionary has a
+ number of contained values: ``match`` is a dictionary: it represents
+ the arguments matched in the URL by the route. ``route`` is an
+ object representing the route which was matched. See also
+ :ref:`custom_route_predicates`. In prior versions, the ``info``
+ argument was always ``None``.
+
Backwards Incompatibilites
--------------------------