1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Fixed #12048 - MultiWidget does not define __deepcopy__

Thanks to powderflask for report, test case and initial patch



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant
2010-03-09 22:52:04 +00:00
parent ea288f14e0
commit e316b8b981
3 changed files with 46 additions and 0 deletions

View File

@@ -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):
"""