mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
[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
This commit is contained in:
parent
7adae30286
commit
36e7739d9d
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user