Skip to content

Commit 36e7739

Browse files
committed
[1.1.X] Fixed #12217: Documented the fact that serving flatpages from the flatpage middleware does not apply view middleware methods. Backport of [12671] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 7adae30 commit 36e7739

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/ref/contrib/flatpages.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ If it doesn't find a match, the request continues to be processed as usual.
8080
The middleware only gets activated for 404s -- not for 500s or responses of any
8181
other status code.
8282

83+
.. admonition:: Flatpages will not apply view middleware
84+
85+
Because the ``FlatpageFallbackMiddleware`` is applied only after
86+
URL resolution has failed and produced a 404, the response it
87+
returns will not apply any :ref:`view middleware <view-middlware>`
88+
methods. Only requests which are successfully routed to a view via
89+
normal URL resolution apply view middleware.
90+
8391
Note that the order of :setting:`MIDDLEWARE_CLASSES` matters. Generally, you can
8492
put :class:`~django.contrib.flatpages.middleware.FlatpageFallbackMiddleware` at
8593
the end of the list, because it's a last resort.

0 commit comments

Comments
 (0)