summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pyramid/config/routes.py24
-rw-r--r--src/pyramid/config/views.py23
2 files changed, 22 insertions, 25 deletions
diff --git a/src/pyramid/config/routes.py b/src/pyramid/config/routes.py
index 44fbb9c46..78e708d1e 100644
--- a/src/pyramid/config/routes.py
+++ b/src/pyramid/config/routes.py
@@ -40,13 +40,10 @@ class RoutesConfiguratorMixin(object):
inherit_slash=None,
**predicates
):
- """ Add a :term:`route configuration` to the current
- configuration state, as well as possibly a :term:`view
- configuration` to be used to specify a :term:`view callable`
- that will be invoked when this route matches. The arguments
- to this method are divided into *predicate*, *non-predicate*,
- and *view-related* types. :term:`Route predicate` arguments
- narrow the circumstances in which a route will be match a
+ """ Add a :term:`route configuration` to the current configuration
+ state. Arguments to ``add_route`` are divided into *predicate*
+ and *non-predicate* types. :term:`Route predicate` arguments
+ narrow the circumstances in which a route will match a
request; non-predicate arguments are informational.
Non-Predicate Arguments
@@ -283,6 +280,8 @@ class RoutesConfiguratorMixin(object):
.. versionadded:: 1.4a4
+ .. deprecated:: 2.0
+
custom_predicates
.. deprecated:: 1.5
@@ -302,14 +301,13 @@ class RoutesConfiguratorMixin(object):
:ref:`custom_route_predicates` for more information about
``info``.
- predicates
+ \\*\\*predicates
- Pass a key/value pair here to use a third-party predicate
- registered via
+ Pass extra keyword parameters to use custom predicates registered via
:meth:`pyramid.config.Configurator.add_route_predicate`. More than
- one key/value pair can be used at the same time. See
+ one custom predicate can be used at the same time. See
:ref:`view_and_route_predicates` for more information about
- third-party predicates.
+ custom predicates.
.. versionadded:: 1.4
@@ -321,7 +319,7 @@ class RoutesConfiguratorMixin(object):
'Configurator.add_route is deprecated as of Pyramid 1.5. '
'Use "config.add_route_predicate" and use the registered '
'route predicate as a predicate argument to add_route '
- 'instead. See "Adding A Third Party View, Route, or '
+ 'instead. See "Adding A Custom View, Route, or '
'Subscriber Predicate" in the "Hooks" chapter of the '
'documentation for more information.'
),
diff --git a/src/pyramid/config/views.py b/src/pyramid/config/views.py
index 2cc5e8144..c4fb54dd8 100644
--- a/src/pyramid/config/views.py
+++ b/src/pyramid/config/views.py
@@ -723,31 +723,30 @@ class ViewsConfiguratorMixin(object):
.. versionadded:: 1.4a4
+ .. deprecated:: 2.0
+
custom_predicates
.. deprecated:: 1.5
This value should be a sequence of references to custom
- predicate callables. 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:
+ predicate callables. 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. The ``predicates`` argument
- to this method and the ability to register third-party view
- predicates via
+ the context and/or the request. The ability to register
+ custom view predicates via
:meth:`pyramid.config.Configurator.add_view_predicate`
obsoletes this argument, but it is kept around for backwards
compatibility.
- view_options
+ \\*\\*view_options
- Pass a key/value pair here to use a third-party predicate or set a
- value for a view deriver. See
+ Pass extra keyword parameters to use custom predicates
+ or set a value for a view deriver. See
:meth:`pyramid.config.Configurator.add_view_predicate` and
:meth:`pyramid.config.Configurator.add_view_deriver`. See
:ref:`view_and_route_predicates` for more information about
- third-party predicates and :ref:`view_derivers` for information
+ custom predicates and :ref:`view_derivers` for information
about view derivers.
.. versionadded: 1.4a1
@@ -769,7 +768,7 @@ class ViewsConfiguratorMixin(object):
'Configurator.add_view is deprecated as of Pyramid 1.5. '
'Use "config.add_view_predicate" and use the registered '
'view predicate as a predicate argument to add_view '
- 'instead. See "Adding A Third Party View, Route, or '
+ 'instead. See "Adding A Custom View, Route, or '
'Subscriber Predicate" in the "Hooks" chapter of the '
'documentation for more information.'
),