|
@@ -97,6 +97,21 @@ calling ANY other request, view or exception middleware, or the appropriate
|
|
|
view; it'll return that :class:`~django.http.HttpResponse`. Response
|
|
|
middleware is always called on every response.
|
|
|
|
|
|
+.. note::
|
|
|
+ Accessing :attr:`request.POST <django.http.HttpRequest.POST>` or
|
|
|
+ :attr:`request.REQUEST <django.http.HttpRequest.REQUEST>` inside
|
|
|
+ middleware from ``process_request`` or ``process_view`` will prevent any
|
|
|
+ view running after the middleware from being able to
|
|
|
+ :ref:`modify the upload handlers for the
|
|
|
+ request <modifying_upload_handlers_on_the_fly>`, and should normally be
|
|
|
+ avoided.
|
|
|
+
|
|
|
+ The :class:`~django.middleware.csrf.CsrfViewMiddleware` class can be
|
|
|
+ considered an exception, as it provides the
|
|
|
+ :func:`~django.views.decorators.csrf.csrf_exempt` and
|
|
|
+ :func:`~django.views.decorators.csrf.csrf_protect` decorators which allow
|
|
|
+ views to explicitly control at what point the CSRF validation should occur.
|
|
|
+
|
|
|
.. _template-response-middleware:
|
|
|
|
|
|
``process_template_response``
|