mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
[py3] Replaced basestring by six.string_types.
This commit is contained in:
parent
cacd845996
commit
3cb2457f46
73 changed files with 230 additions and 150 deletions
|
@ -4,6 +4,7 @@ import json
|
|||
|
||||
from django.db import models
|
||||
from django.utils.encoding import force_unicode
|
||||
from django.utils import six
|
||||
|
||||
|
||||
class Small(object):
|
||||
|
@ -66,7 +67,7 @@ class JSONField(models.TextField):
|
|||
if not value:
|
||||
return None
|
||||
|
||||
if isinstance(value, basestring):
|
||||
if isinstance(value, six.string_types):
|
||||
value = json.loads(value)
|
||||
return value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue