#36587: Incorrect sentence in documentation about upload handlers
-------------------------------------+-------------------------------------
     Reporter:  Baptiste Mispelon    |                     Type:  Bug
       Status:  new                  |                Component:
                                     |  Documentation
      Version:  5.2                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 The documentation about changing upload handlers on the fly [1] states:

   For instance, suppose you’ve written a ProgressBarUploadHandler that
 provides feedback on upload progress to some sort of AJAX widget. You’d
 add this handler to your upload handlers like this:
   `request.upload_handlers.insert(0, ProgressBarUploadHandler(request))`
   You’d probably want to use `list.insert()` in this case (instead of
 `append()`) because a progress bar handler would need to run before any
 other handlers. Remember, the upload handlers are processed in order.

 The part that says "You'd probably want to use list.insert [...] (instead
 of append)" is incorrect, since the example is already using
 `list.insert`. The sentence should just say something like:

     We use `list.insert` to make sure the progress bar handler is run
 before any other handlers, since the upload handlers are processed in
 order.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36587>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070199058ff73d-852d08ef-c2dd-4dc6-87d0-14f751846d8e-000000%40eu-central-1.amazonses.com.

Reply via email to