MultiWidget does not respect Widget.needs_multipart_form
|Reported by:||tim_heap||Owned by:||nobody|
|Has patch:||no||Needs documentation:|
|Needs tests:||Patch needs improvement:|
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.