Skip to content

Commit 47ff7c3

Browse files
committed
Added Python 3 support.
1 parent a5a8f7b commit 47ff7c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tagging/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import types
77

88
from django.db.models.query import QuerySet
9-
from django.utils.encoding import force_unicode
9+
from django.utils.encoding import force_text
1010
from django.utils.translation import ugettext as _
1111

1212
# Python 2.3 compatibility
@@ -26,7 +26,7 @@ def parse_tag_input(input):
2626
if not input:
2727
return []
2828

29-
input = force_unicode(input)
29+
input = force_text(input)
3030

3131
# Special case - if there are no commas or double quotes in the
3232
# input, we don't *do* a recall... I mean, we know we only need to
@@ -179,7 +179,7 @@ def get_tag_list(tags):
179179
contents.add('int')
180180
if len(contents) == 1:
181181
if 'string' in contents:
182-
return Tag.objects.filter(name__in=[force_unicode(tag) \
182+
return Tag.objects.filter(name__in=[force_text(tag) \
183183
for tag in tags])
184184
elif 'tag' in contents:
185185
return tags

0 commit comments

Comments
 (0)