diff options
| author | Éric Araujo <merwok@netwok.org> | 2020-01-08 04:35:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-08 04:35:56 -0500 |
| commit | b8e1e9191005fbf72427d42eab68b8433fc42949 (patch) | |
| tree | 57d29e065b0d6d0b6af807ec2a1a208db837022e /docs/narr | |
| parent | 26d2d87bc2865a431b5eb30552c3eac4108b3a0c (diff) | |
| download | pyramid-b8e1e9191005fbf72427d42eab68b8433fc42949.tar.gz pyramid-b8e1e9191005fbf72427d42eab68b8433fc42949.tar.bz2 pyramid-b8e1e9191005fbf72427d42eab68b8433fc42949.zip | |
first batch of fixes from code review
Co-Authored-By: Steve Piercy <web@stevepiercy.com>
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/urldispatch.rst | 6 | ||||
| -rw-r--r-- | docs/narr/viewconfig.rst | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 6dd8b1455..dab6a42ec 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -1163,7 +1163,7 @@ instance, a predicate might do some type conversion of values: config.add_route_predicate('integers', IntegersPredicate) config.add_route('ymd', '/{year}/{month}/{day}', - integers=('year', 'month', 'day') + integers=('year', 'month', 'day')) Note that a conversion predicate is still a predicate, so it must return ``True`` or ``False``. A predicate that does *only* conversion, such as the one @@ -1194,7 +1194,7 @@ expressions specifying requirements for that marker. For instance: config.add_route_predicate('integers', IntegersPredicate) config.add_route('ymd', '/{year:\d+}/{month:\d+}/{day:\d+}', - integers=('year', 'month', 'day') + integers=('year', 'month', 'day')) Now the try/except is no longer needed because the route will not match at all unless these markers match ``\d+`` which requires them to be valid digits for @@ -1259,7 +1259,7 @@ that is to use the same argument name and value that in the call to .. seealso:: See :ref:`registering_thirdparty_predicates` for more information about - custom view, route and subscriber predicates. + custom view, route, and subscriber predicates. See also :class:`pyramid.interfaces.IRoute` for more API documentation about route objects. diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index eb5233e84..3e596b030 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -517,7 +517,7 @@ configured view. This parameter is kept around for backward compatibility. .. deprecated:: 1.5 - See section below for new-style custom predicates. + See section below for new-style custom predicates. ``**predicates`` Extra keyword parameters are used to invoke custom predicates, defined |
