From 5664c428e22d73f8b4315b678588150d9bb2f0f5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 6 Aug 2012 11:10:15 -0400 Subject: add as-of-version notes --- docs/narr/hooks.rst | 4 ++++ pyramid/config/routes.py | 17 ++++++++++++----- pyramid/config/views.py | 17 ++++++++++++----- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index bdd968362..73ee655ea 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -1238,6 +1238,10 @@ implict and explicit tween chains used by an application. See Adding A Third Party View or Route Predicate -------------------------------------------- +.. note:: + + Third-party predicates are a feature new as of Pyramid 1.4. + View and route predicates used during view configuration allow you to narrow the set of circumstances under which a view or route will match. For example, the ``request_method`` view predicate can be used to ensure a view diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index ff285569d..d8ce4804c 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -261,11 +261,12 @@ class RoutesConfiguratorMixin(object): other_predicates - Pass a key/value pair here to use a third-party predicate registered - via :meth:`pyramid.config.Configurator.add_view_predicate`. More - than one key/value pair can be used at the same time. See - :ref:`registering_thirdparty_predicates` for more information - about third-party predicates. + Pass a key/value pair here to use a third-party predicate + registered via + :meth:`pyramid.config.Configurator.add_view_predicate`. More than + one key/value pair can be used at the same time. See + :ref:`registering_thirdparty_predicates` for more information about + third-party predicates. This argument is new as of Pyramid 1.4. View-Related Arguments @@ -486,6 +487,12 @@ class RoutesConfiguratorMixin(object): ``add_view``). ``factory`` should be a :term:`predicate factory`. + + See :ref:`registering_thirdparty_predicates` for more information. + + .. note:: + + This method is new as of Pyramid 1.4. """ discriminator = ('route predicate', name) intr = self.introspectable( diff --git a/pyramid/config/views.py b/pyramid/config/views.py index 3f0c5c7c8..4491272d3 100644 --- a/pyramid/config/views.py +++ b/pyramid/config/views.py @@ -1000,11 +1000,12 @@ class ViewsConfiguratorMixin(object): other_predicates - Pass a key/value pair here to use a third-party predicate registered - via :meth:`pyramid.config.Configurator.add_view_predicate`. More - than one key/value pair can be used at the same time. See - :ref:`registering_thirdparty_predicates` for more information - about third-party predicates. + Pass a key/value pair here to use a third-party predicate + registered via + :meth:`pyramid.config.Configurator.add_view_predicate`. More than + one key/value pair can be used at the same time. See + :ref:`registering_thirdparty_predicates` for more information about + third-party predicates. This argument is new as of Pyramid 1.4. """ view = self.maybe_dotted(view) @@ -1321,6 +1322,12 @@ class ViewsConfiguratorMixin(object): ``add_view`` by others). ``factory`` should be a :term:`predicate factory`. + + See :ref:`registering_thirdparty_predicates` for more information. + + .. note:: + + This method is new as of Pyramid 1.4. """ discriminator = ('view predicate', name) intr = self.introspectable( -- cgit v1.2.3