Ticket #8078: sets.diff

File sets.diff, 1.1 KB (added by Karen Tracey, 16 years ago)
  • django/contrib/admin/options.py

     
    1414from django.utils.text import capfirst, get_text_list
    1515from django.utils.translation import ugettext as _
    1616from django.utils.encoding import force_unicode
    17 import sets
     17try:
     18    set
     19except NameError:
     20    from sets import Set as set     # Python 2.3 fallback
    1821
    1922HORIZONTAL, VERTICAL = 1, 2
    2023# returns the <ul> class for a given radio_admin field
     
    646649        # Populate deleted_objects, a data structure of all related objects that
    647650        # will also be deleted.
    648651        deleted_objects = [mark_safe(u'%s: <a href="../../%s/">%s</a>' % (escape(force_unicode(capfirst(opts.verbose_name))), quote(object_id), escape(obj))), []]
    649         perms_needed = sets.Set()
     652        perms_needed = set()
    650653        get_deleted_objects(deleted_objects, perms_needed, request.user, obj, opts, 1, self.admin_site)
    651654
    652655        if request.POST: # The user has already confirmed the deletion.
Back to Top