However, it shows that BaseFormatSet.is_multipart() only considers the
first form of the form set which causes my FormSet to fail if a FileField
exists in some forms of the form set, but no in the first one.
Of course, I can solve my problem by implementing is_multipart() by myself
but this seems like an ugly workaround. In my opinion,
BaseFormatSet.is_multipart() should check all forms of the form set
whether any of them contains a field which requires multipart encoding.
--
Ticket URL: <https://code.djangoproject.com/ticket/22855>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/22855#comment:1>
* status: new => closed
* resolution: => wontfix
Comment:
I tend to think it's better for you to override it for your use case
rather than impose the performance penalty of iterating through all forms
on all users. There are similar assumptions in `BaseFormSet`, like the
`media` property, that assume all forms will be identical.
--
Ticket URL: <https://code.djangoproject.com/ticket/22855#comment:2>