summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/admin/widgets.py6
1 files changed, 6 insertions, 0 deletions
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'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="Add Another"/></a>' % 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)