Document CBV decoration for modifying upload handlers on the fly
In this documentation, there is a very important and helpful note in modifying upload handlers on the fly. However, it only covers how to decorate the view when it is a function. It does not cover how to decorate the view when it is a class. There are StackOverflow questions that answer that, but it requires some digging. I would greatly appreciate anyone to add guidance on how to change file upload handlers in a class-based view.
https://docs.djangoproject.com/en/dev/topics/http/file-uploads/#modifying-upload-handlers-on-the-fly
Change History
(8)
Summary: |
Document CBV decoration for FIleUploadHandler → Document CBV decoration for modifying upload handlers on the fly
|
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
changed from nobody to Nick Frazier
|
Status: |
new → assigned
|
Has patch: |
set
|
Owner: |
changed from Nick Frazier to SREEHARI K.V
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Accepting on the basis that using CBVs is probably the most prevalent form these days, and I genuinely wouldn't know which bits of the CBV to decorate with what. I'd guess
method_decorator
would be necessary too.Some documentation indicating the correct path would not be amiss -- most of that section hasn't been touched since 2010 or earlier, predating CBVs.