mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
Fixed #20850 -- Added MultiWidget.needs_multipart_form
This commit is contained in:
@@ -840,6 +840,11 @@ class MultiWidget(Widget):
|
||||
obj.widgets = copy.deepcopy(self.widgets)
|
||||
return obj
|
||||
|
||||
@property
|
||||
def needs_multipart_form(self):
|
||||
return any(w.needs_multipart_form for w in self.widgets)
|
||||
|
||||
|
||||
class SplitDateTimeWidget(MultiWidget):
|
||||
"""
|
||||
A Widget that splits datetime input into two <input type="text"> boxes.
|
||||
|
||||
Reference in New Issue
Block a user