[Django] #33172: Document CBV decoration for FIleUploadHandler

1 view
Skip to first unread message

Django

unread,
Oct 5, 2021, 10:33:46 AM10/5/21
to django-...@googlegroups.com
#33172: Document CBV decoration for FIleUploadHandler
------------------------------------------------+------------------------
Reporter: Matthew Pava | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: dev
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 |
------------------------------------------------+------------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/33172>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 5, 2021, 10:34:10 AM10/5/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
-------------------------------------+-------------------------------------

Reporter: Matthew Pava | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: dev
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:1>

Django

unread,
Oct 6, 2021, 6:01:22 AM10/6/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
--------------------------------------+------------------------------------

Reporter: Matthew Pava | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Keryn Knight):

* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:2>

Django

unread,
Oct 7, 2021, 8:40:32 AM10/7/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
--------------------------------------+------------------------------------
Reporter: Matthew Pava | Owner: fraziern
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by fraziern):

* owner: nobody => fraziern
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:3>

Django

unread,
Oct 13, 2021, 1:58:54 AM10/13/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
-------------------------------------+-------------------------------------
Reporter: Matthew Pava | Owner: SREEHARI
Type: | K.V
Cleanup/optimization | Status: assigned
Component: Documentation | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: Nick Frazier => SREEHARI K.V
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14977 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:4>

Django

unread,
Oct 15, 2021, 2:39:41 PM10/15/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
-------------------------------------+-------------------------------------
Reporter: Matthew Pava | Owner: SREEHARI
Type: | K.V
Cleanup/optimization | Status: assigned
Component: Documentation | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:5>

Django

unread,
Oct 18, 2021, 3:49:57 AM10/18/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
-------------------------------------+-------------------------------------
Reporter: Matthew Pava | Owner: SREEHARI
Type: | K.V
Cleanup/optimization | Status: assigned
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:6>

Django

unread,
Oct 18, 2021, 4:26:22 AM10/18/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
-------------------------------------+-------------------------------------
Reporter: Matthew Pava | Owner: SREEHARI
Type: | K.V
Cleanup/optimization | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"e2f778d57947d168a875159e6df075255eea4bbc" e2f778d5]:
{{{
#!CommitTicketReference repository=""
revision="e2f778d57947d168a875159e6df075255eea4bbc"
Fixed #33172 -- Added example of modifying upload handlers on the fly for
CBVs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:7>

Django

unread,
Oct 18, 2021, 4:26:23 AM10/18/21
to django-...@googlegroups.com
#33172: Document CBV decoration for modifying upload handlers on the fly
-------------------------------------+-------------------------------------
Reporter: Matthew Pava | Owner: SREEHARI
Type: | K.V
Cleanup/optimization | Status: closed
Component: Documentation | Version: dev

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"c067a2b68fe2701608b34ac4a538e1f9dba0e9f2" c067a2b]:
{{{
#!CommitTicketReference repository=""
revision="c067a2b68fe2701608b34ac4a538e1f9dba0e9f2"
[4.0.x] Fixed #33172 -- Added example of modifying upload handlers on the
fly for CBVs.

Backport of e2f778d57947d168a875159e6df075255eea4bbc from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33172#comment:8>

Reply all
Reply to author
Forward
0 new messages