[1.1.X] Python 2.3 compatibility: moved the fallback import for set to where set() is now used.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12601 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Karen Tracey 2010-02-26 14:24:08 +00:00
parent 3bda1f5bd3
commit 0c2d3ff7a1
3 changed files with 5 additions and 8 deletions

View File

@ -12,10 +12,6 @@ from django.utils.html import escape
from django.utils.safestring import mark_safe
from django.utils.text import capfirst
from django.utils.translation import ugettext_lazy, ugettext as _
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
def delete_selected(modeladmin, request, queryset):
"""

View File

@ -20,10 +20,6 @@ from django.utils.text import capfirst, get_text_list
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext, ugettext_lazy
from django.utils.encoding import force_unicode
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
HORIZONTAL, VERTICAL = 1, 2
# returns the <ul> class for a given radio_admin field

View File

@ -9,6 +9,11 @@ from django.core.urlresolvers import reverse, NoReverseMatch
from django.utils.datastructures import SortedDict
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
def quote(s):
"""
Ensure that primary key values do not confuse the admin URLs by escaping