diff options
| author | Chris McDonough <chrism@plope.com> | 2012-08-06 11:10:15 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-08-06 11:10:15 -0400 |
| commit | 5664c428e22d73f8b4315b678588150d9bb2f0f5 (patch) | |
| tree | 76414ae02574004e7a344a35f82942845e955c6f | |
| parent | 3c1205018dd020df3b3f91f010e90bdbaccce33f (diff) | |
| download | pyramid-5664c428e22d73f8b4315b678588150d9bb2f0f5.tar.gz pyramid-5664c428e22d73f8b4315b678588150d9bb2f0f5.tar.bz2 pyramid-5664c428e22d73f8b4315b678588150d9bb2f0f5.zip | |
add as-of-version notes
| -rw-r--r-- | docs/narr/hooks.rst | 4 | ||||
| -rw-r--r-- | pyramid/config/routes.py | 17 | ||||
| -rw-r--r-- | 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( |
