diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2014-12-14 19:21:55 -0700 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2015-02-05 23:05:02 -0700 |
| commit | 958c4c7de27b3353dab6e2a7552a17321236c138 (patch) | |
| tree | cd08f1b00e6a63748e0130f4fd8c94b639bb5705 | |
| parent | 63366c3ddf353bbd2a237875f0c42e8f470c31c7 (diff) | |
| download | pyramid-958c4c7de27b3353dab6e2a7552a17321236c138.tar.gz pyramid-958c4c7de27b3353dab6e2a7552a17321236c138.tar.bz2 pyramid-958c4c7de27b3353dab6e2a7552a17321236c138.zip | |
Update add_route accept to non-predicate
| -rw-r--r-- | pyramid/config/routes.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index 509955cdd..c6e8fe563 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -138,6 +138,19 @@ class RoutesConfiguratorMixin(object): .. versionadded:: 1.1 + accept + + This value represents a match query for one or more + mimetypes in the ``Accept`` HTTP request header. If this + value is specified, it must be in one of the following + forms: a mimetype match token in the form ``text/plain``, a + wildcard mimetype match token in the form ``text/*`` or a + match-all wildcard mimetype match token in the form ``*/*``. + If any of the forms matches the ``Accept`` header of the + request, or if the ``Accept`` header isn't set at all in the + request, this predicate will be true. If this predicate + returns ``False``, route matching continues. + Predicate Arguments pattern @@ -220,19 +233,6 @@ class RoutesConfiguratorMixin(object): case of the header name is not significant. If this predicate returns ``False``, route matching continues. - accept - - This value represents a match query for one or more - mimetypes in the ``Accept`` HTTP request header. If this - value is specified, it must be in one of the following - forms: a mimetype match token in the form ``text/plain``, a - wildcard mimetype match token in the form ``text/*`` or a - match-all wildcard mimetype match token in the form ``*/*``. - If any of the forms matches the ``Accept`` header of the - request, or if the ``Accept`` header isn't set at all in the - request, this predicate will be true. If this predicate - returns ``False``, route matching continues. - effective_principals If specified, this value should be a :term:`principal` identifier or |
