diff options
| author | Éric Araujo <earaujo@caravan.coop> | 2020-01-07 14:33:31 -0500 |
|---|---|---|
| committer | Éric Araujo <earaujo@caravan.coop> | 2020-01-07 14:33:31 -0500 |
| commit | 26d2d87bc2865a431b5eb30552c3eac4108b3a0c (patch) | |
| tree | 2bcecba6b70e79eb8d732d8eceeb5e3ff1d46ef1 /src | |
| parent | 5702c3c3a4357a6071c9ba624a89655209548336 (diff) | |
| download | pyramid-26d2d87bc2865a431b5eb30552c3eac4108b3a0c.tar.gz pyramid-26d2d87bc2865a431b5eb30552c3eac4108b3a0c.tar.bz2 pyramid-26d2d87bc2865a431b5eb30552c3eac4108b3a0c.zip | |
rewrite docs for custom predicates
Diffstat (limited to 'src')
| -rw-r--r-- | src/pyramid/config/routes.py | 12 | ||||
| -rw-r--r-- | src/pyramid/config/views.py | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/src/pyramid/config/routes.py b/src/pyramid/config/routes.py index 44fbb9c46..cc3a87b2e 100644 --- a/src/pyramid/config/routes.py +++ b/src/pyramid/config/routes.py @@ -40,7 +40,7 @@ class RoutesConfiguratorMixin(object): inherit_slash=None, **predicates ): - """ Add a :term:`route configuration` to the current + r""" 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 @@ -283,6 +283,8 @@ class RoutesConfiguratorMixin(object): .. versionadded:: 1.4a4 + .. deprecated:: 2.0 + custom_predicates .. deprecated:: 1.5 @@ -302,14 +304,14 @@ 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 + Pass extra keyword parameters to use custom or third-party 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 diff --git a/src/pyramid/config/views.py b/src/pyramid/config/views.py index 2cc5e8144..20f20b5e8 100644 --- a/src/pyramid/config/views.py +++ b/src/pyramid/config/views.py @@ -266,7 +266,7 @@ class ViewsConfiguratorMixin(object): exception_only=False, **view_options ): - """ Add a :term:`view configuration` to the current + r""" Add a :term:`view configuration` to the current configuration state. Arguments to ``add_view`` are broken down below into *predicate* arguments and *non-predicate* arguments. Predicate arguments narrow the circumstances in @@ -723,6 +723,8 @@ class ViewsConfiguratorMixin(object): .. versionadded:: 1.4a4 + .. deprecated:: 2.0 + custom_predicates .. deprecated:: 1.5 @@ -740,14 +742,14 @@ class ViewsConfiguratorMixin(object): 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 or third-party 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 |
