summaryrefslogtreecommitdiff
path: root/docs/whatsnew-1.3.rst
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/whatsnew-1.3.rst
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/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
--------------------------