1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[py3] Replaced unicode/str by six.text_type/bytes.

This commit is contained in:
Aymeric Augustin
2012-07-20 14:48:51 +02:00
parent 3cb2457f46
commit bdca5ea345
96 changed files with 376 additions and 294 deletions

View File

@@ -19,7 +19,7 @@ class Small(object):
return '%s%s' % (force_unicode(self.first), force_unicode(self.second))
def __str__(self):
return unicode(self).encode('utf-8')
return six.text_type(self).encode('utf-8')
class SmallField(models.Field):
"""
@@ -42,7 +42,7 @@ class SmallField(models.Field):
return Small(value[0], value[1])
def get_db_prep_save(self, value, connection):
return unicode(value)
return six.text_type(value)
def get_prep_lookup(self, lookup_type, value):
if lookup_type == 'exact':