From d7c9f0a8190b5041f8efb7f83535d181f6499605 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 14 Dec 2014 18:51:23 -0700 Subject: Move documentation for accept to non-predicate While accept is partially documented as a predicate, it is actually NOT a predicate in that the view machinery has all kinds of special cases for it. This also means that `not_` will not function on it correctly since it is not actually a predicate. --- pyramid/config/views.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pyramid/config/views.py b/pyramid/config/views.py index c01b72e12..8ee7ca6c9 100644 --- a/pyramid/config/views.py +++ b/pyramid/config/views.py @@ -841,6 +841,17 @@ class ViewsConfiguratorMixin(object): very useful for 'civilians' who are just developing stock Pyramid applications. Pay no attention to the man behind the curtain. + accept + + The value of this argument 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, this predicate will be true. + Predicate Arguments name @@ -941,17 +952,6 @@ class ViewsConfiguratorMixin(object): This is useful for detecting AJAX requests issued from jQuery, Prototype and other Javascript libraries. - accept - - The value of this argument 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, this predicate will be true. - header This value represents an HTTP header name or a header -- cgit v1.2.3