diff options
| author | Tim Heap <tim@ionata.com.au> | 2013-08-05 10:01:49 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-05 10:02:28 -0400 |
| commit | 75c87e2d38b181163a61ea99f2a17273274a3a2b (patch) | |
| tree | cb2395075103cdac8924d48792d8cef52a0cb5ab /django/forms | |
| parent | 6d88d47be6d37234aab86d0e863e371f28347d12 (diff) | |
Fixed #20850 -- Added MultiWidget.needs_multipart_form
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/widgets.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 784ccda159..0a5059a9c2 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -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. |
