Django

Code

Changeset 6415

Show
Ignore:
Timestamp:
09/24/07 18:23:54 (1 year ago)
Author:
jkocherhans
Message:

newforms-admin: Fixed a deepcopy bug in RelatedFieldWidgetWrapper?. This should probably be addressed in the base Widget class in trunk, but I'm not going to make that call. Refs #5505.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/newforms-admin/django/contrib/admin/widgets.py

    r6323 r6415  
    22Form Widget classes specific to the Django admin site. 
    33""" 
     4import copy 
    45 
    56from django import newforms as forms 
     
    132133            output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="Add Another"/></a>' % settings.ADMIN_MEDIA_PREFIX) 
    133134        return u''.join(output) 
     135 
     136    def __deepcopy__(self, memo): 
     137        # There is no reason to deepcopy self.admin_site, etc, so just return 
     138        # a shallow copy. 
     139        return copy.copy(self)