Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #12217: Documented the fact that serving flatpages from the fla…

…tpage middleware does not apply view middleware methods.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 795e3235ffea86117848b0b3c970b86f443daec3 1 parent cdd9507
@ubernostrum ubernostrum authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 docs/ref/contrib/flatpages.txt
8 docs/ref/contrib/flatpages.txt
@@ -80,6 +80,14 @@ If it doesn't find a match, the request continues to be processed as usual.
The middleware only gets activated for 404s -- not for 500s or responses of any
other status code.
+.. admonition:: Flatpages will not apply view middleware
+ Because the ``FlatpageFallbackMiddleware`` is applied only after
+ URL resolution has failed and produced a 404, the response it
+ returns will not apply any :ref:`view middleware <view-middlware>`
+ methods. Only requests which are successfully routed to a view via
+ normal URL resolution apply view middleware.
Note that the order of :setting:`MIDDLEWARE_CLASSES` matters. Generally, you can
put :class:`~django.contrib.flatpages.middleware.FlatpageFallbackMiddleware` at
the end of the list, because it's a last resort.

0 comments on commit 795e323

Please sign in to comment.
Something went wrong with that request. Please try again.