diff options
| author | Éric Araujo <earaujo@caravan.coop> | 2020-01-17 16:04:45 -0500 |
|---|---|---|
| committer | Éric Araujo <earaujo@caravan.coop> | 2020-01-17 16:04:45 -0500 |
| commit | 36164ac5a88a8b878d9c62c652bea840d3e9e461 (patch) | |
| tree | a8bd095c9ee705095a3abcd0a46a8013514a1574 /docs/narr | |
| parent | b102650f3ba20d3153ddff005d49f8c33fef8886 (diff) | |
| download | pyramid-36164ac5a88a8b878d9c62c652bea840d3e9e461.tar.gz pyramid-36164ac5a88a8b878d9c62c652bea840d3e9e461.tar.bz2 pyramid-36164ac5a88a8b878d9c62c652bea840d3e9e461.zip | |
say something about the predicate factory info arg
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/urldispatch.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 9c1495df1..bc2509e3f 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -1128,6 +1128,7 @@ See this code: We register this class as a :term:`predicate factory` with the ``any_of`` keyword argument name. Then we use that new keyword argument with :meth:`~pyramid.config.Configurator.add_route`. When the route is requested, Pyramid instantiates the ``AnyOfPredicate`` class using the value passed to the ``any_of`` argument. +(The ``info`` parameter passed to the factory contains some metadata, you can ignore it for now.) The resulting instance is a :term:`predicate`. It will determine whether incoming requests satisfy its condition. In the example above, a request for ``/three`` would match the route's URL pattern and satisfy the route's predicate because ``three`` is one of the allowed values, so the route would be matched. |
