Code

Ticket #16430: 16430.patch

File 16430.patch, 1.1 KB (added by tomchristie, 3 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..03ba1b6 100644
    a b list:: 
    280280    :class:`~django.middleware.csrf.CsrfViewMiddleware` which is enabled by 
    281281    default. This means you will probably need to use 
    282282    :func:`~django.views.decorators.csrf.csrf_exempt` on your view to allow you 
    283     to change the upload handlers. Assuming you do need CSRF protection, you 
    284     will then need to use :func:`~django.views.decorators.csrf.csrf_protect` on 
    285     the function that actually processes the request.  Note that this means that 
    286     the handlers may start receiving the file upload before the CSRF checks have 
    287     been done. Example code: 
     283    to change the upload handlers.  You will then need to use 
     284    :func:`~django.views.decorators.csrf.csrf_protect` on the function that 
     285    actually processes the request.  Note that this means that the handlers may 
     286    start receiving the file upload before the CSRF checks have been done. 
     287    Example code: 
    288288 
    289289    .. code-block:: python 
    290290