From 4cc3a67060f22bb11d037bd44a24112efca6d507 Mon Sep 17 00:00:00 2001 From: Michael Merickel <michael@merickel.org> Date: Wed, 10 Oct 2018 07:18:28 +0200 Subject: [PATCH] fix up the docs --- pyramid/config/routes.py | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index 4d1f830..832fd3f 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -228,17 +228,21 @@ accept A :term:`media type` that will be matched against the ``Accept`` - HTTP request header. This value may be a specific media type such - as ``text/html``, or a list of the same. If the media type is - acceptable by the ``Accept`` header of the request, or if the - ``Accept`` header isn't set at all in the request, this predicate - will match. If this does not match the ``Accept`` header of the - request, route matching continues. + HTTP request header. If this value is specified, it may be a + specific media type such as ``text/html``, or a list of the same. + If the media type is acceptable by the ``Accept`` header of the + request, or if the ``Accept`` header isn't set at all in the request, + this predicate will match. If this does not match the ``Accept`` + header of the request, route matching continues. If ``accept`` is not specified, the ``HTTP_ACCEPT`` HTTP header is not taken into consideration when deciding whether or not to select the route. + Unlike the ``accept`` argument to + :meth:`pyramid.config.Configurator.add_view`, this value is + strictly a predicate and supports :func:`pyramid.config.not_`. + .. versionchanged:: 1.10 Specifying a media range is deprecated due to changes in WebOb -- Gitblit v1.9.3