summaryrefslogtreecommitdiff
path: root/django/forms/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/fields.py')
-rw-r--r--django/forms/fields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 4c4209dddd..9c944ad0ac 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -331,10 +331,10 @@ class BaseTemporalField(Field):
def to_python(self, value):
# Try to coerce the value to unicode.
unicode_value = force_unicode(value, strings_only=True)
- if isinstance(unicode_value, unicode):
+ if isinstance(unicode_value, six.text_type):
value = unicode_value.strip()
# If unicode, try to strptime against each input format.
- if isinstance(value, unicode):
+ if isinstance(value, six.text_type):
for format in self.input_formats:
try:
return self.strptime(value, format)