Ticket #16384: 16384.patch

File 16384.patch, 1.7 KB (added by Tom Christie, 13 years ago)
  • docs/topics/http/file-uploads.txt

    diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
    index 5326953..f9bf943 100644
    a b could, for example, use custom handlers to enforce user-level quotas, compress  
    240240data on the fly, render progress bars, and even send data to another storage
    241241location directly without storing it locally.
    242242
     243.. _modifying_upload_handlers_on_the_fly:
     244
    243245Modifying upload handlers on the fly
    244246------------------------------------
    245247
  • docs/topics/http/middleware.txt

    diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt
    index c9c2311..a7920bb 100644
    a b calling ANY other request, view or exception middleware, or the appropriate  
    9797view; it'll return that :class:`~django.http.HttpResponse`. Response
    9898middleware is always called on every response.
    9999
     100.. note::
     101    Accessing ``request.POST`` or ``request.REQUEST`` inside middleware from
     102    ``process_request`` or ``process_view`` will prevent any view running after
     103    the middleware from being able to  :ref:`modify the upload handlers for the
     104    request <modifying_upload_handlers_on_the_fly>`, and should normally be
     105    avoided.
     106
     107    The :class:`~django.middleware.csrf.CsrfViewMiddleware` class can be
     108    considered an exception, as it provides the
     109    :func:`~django.views.decorators.csrf.csrf_exempt` and
     110    :func:`~django.views.decorators.csrf.csrf_protect` decorators which allow
     111    views to explicitly control at what point the CSRF validation should occur.
     112
    100113.. _template-response-middleware:
    101114
    102115``process_template_response``
Back to Top