Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20850 closed Bug (fixed)

MultiWidget does not respect Widget.needs_multipart_form

Reported by: Tim Heap Owned by: nobody
Component: Uncategorized Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If a widget that is wrapped with a MultiWidget has needs_multipart_form set, the MultiWidget does not reflect that. This prevents automatically setting the form enctype correctly using the Form.is_multipart method.

The ClearableFileField from django-form-utils is an example of such a widget. It combines a FileField with a Checkbox, where the Checkbox allows clearing/removing an already selected file from the form. While this particular widget is now not needed as it is included in Django in an alternate implementation, this bug still exists.

Attachments (1)

0001-Fix-MultiWidgets-not-respecting-subwidgets-need_mult.patch (2.1 KB ) - added by Tim Heap 11 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 75c87e2d38b181163a61ea99f2a17273274a3a2b:

Fixed #20850 -- Added MultiWidget.needs_multipart_form

comment:2 by Tim Graham <timograham@…>, 11 years ago

In 891cdf120a0751b71eb534e14f814f574904ec44:

[1.6.x] Fixed #20850 -- Added MultiWidget.needs_multipart_form

Backport of 75c87e2d38 from master

Note: See TracTickets for help on using tickets.
Back to Top