mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
[py3] Replaced basestring by six.string_types.
This commit is contained in:
@@ -16,6 +16,7 @@ from django.utils.html import conditional_escape, format_html, format_html_join
|
||||
from django.utils.translation import ugettext, ugettext_lazy
|
||||
from django.utils.encoding import StrAndUnicode, force_unicode
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils import six
|
||||
from django.utils import datetime_safe, formats
|
||||
from django.utils import six
|
||||
|
||||
@@ -522,7 +523,7 @@ class CheckboxInput(Widget):
|
||||
value = data.get(name)
|
||||
# Translate true and false strings to boolean values.
|
||||
values = {'true': True, 'false': False}
|
||||
if isinstance(value, basestring):
|
||||
if isinstance(value, six.string_types):
|
||||
value = values.get(value.lower(), value)
|
||||
return value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user