diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 7ce0d36023..492e9d6e6e 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -1,6 +1,7 @@ """ Form Widget classes specific to the Django admin site. """ +import copy from django import newforms as forms from django.utils.datastructures import MultiValueDict @@ -131,3 +132,8 @@ class RelatedFieldWidgetWrapper(object): (related_url, name)) output.append(u'Add Another' % settings.ADMIN_MEDIA_PREFIX) return u''.join(output) + + def __deepcopy__(self, memo): + # There is no reason to deepcopy self.admin_site, etc, so just return + # a shallow copy. + return copy.copy(self)