diff options
| author | Michael Merickel <michael@merickel.org> | 2020-01-17 16:08:35 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-17 16:08:35 -0600 |
| commit | 03d3bbd2791918a844da49eb4449b4953b83a31b (patch) | |
| tree | 5899bebf50a3baf340b8fe650030c6a2b0525d0d /docs/narr/hooks.rst | |
| parent | 9c153e1250e00faa06003c10c3a26886489e6210 (diff) | |
| parent | 108f026e1dcca554867ff8f7a211a5ce0668a26e (diff) | |
| download | pyramid-03d3bbd2791918a844da49eb4449b4953b83a31b.tar.gz pyramid-03d3bbd2791918a844da49eb4449b4953b83a31b.tar.bz2 pyramid-03d3bbd2791918a844da49eb4449b4953b83a31b.zip | |
Merge pull request #3560 from merwok/docs/rewrite-custom-predicates
Rewrite docs for custom predicates
Diffstat (limited to 'docs/narr/hooks.rst')
| -rw-r--r-- | docs/narr/hooks.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index 4a594a8c9..c19d26236 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -1416,10 +1416,10 @@ The ``ptweens`` command-line utility can be used to report the current implicit and explicit tween chains used by an application. See :ref:`displaying_tweens`. -.. _registering_thirdparty_predicates: +.. _registering_custom_predicates: -Adding a Third Party View, Route, or Subscriber Predicate ---------------------------------------------------------- +Adding a Custom View, Route, or Subscriber Predicate +---------------------------------------------------- .. versionadded:: 1.4 @@ -1446,7 +1446,7 @@ Likewise, a similar predicate can be used as a *route* predicate: config.add_route('name', '/foo', request_method='POST') Many other built-in predicates exists (``request_param``, and others). You can -add third-party predicates to the list of available predicates by using one of +add custom predicates to the list of available predicates by using one of :meth:`pyramid.config.Configurator.add_view_predicate` or :meth:`pyramid.config.Configurator.add_route_predicate`. The former adds a view predicate, the latter a route predicate. @@ -1564,7 +1564,7 @@ event type. self.val = val def text(self): - return 'path_startswith = %s' % (self.val,) + return 'request_path_startswith = %s' % (self.val,) phash = text |
