diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 482888da50..8b4112bec5 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -738,6 +738,11 @@ class MultiWidget(Widget): media = media + w.media return media media = property(_get_media) + + def __deepcopy__(self, memo): + obj = super(MultiWidget, self).__deepcopy__(memo) + obj.widgets = copy.deepcopy(self.widgets) + return obj class SplitDateTimeWidget(MultiWidget): """ diff --git a/tests/regressiontests/forms/tests.py b/tests/regressiontests/forms/tests.py index db70500909..8757e799a9 100644 --- a/tests/regressiontests/forms/tests.py +++ b/tests/regressiontests/forms/tests.py @@ -39,6 +39,7 @@ from media import media_tests from fields import FieldsTests from validators import TestFieldWithValidators +from widgets import WidgetTests __test__ = { 'extra_tests': extra_tests, diff --git a/tests/regressiontests/forms/widgets.py b/tests/regressiontests/forms/widgets.py index d862f40b01..cc83a888cf 100644 --- a/tests/regressiontests/forms/widgets.py +++ b/tests/regressiontests/forms/widgets.py @@ -1269,3 +1269,43 @@ u'