diff --git a/json_field.py b/json_field.py index 0ca4528..70cc8da 100644 --- a/json_field.py +++ b/json_field.py @@ -1,5 +1,6 @@ +import json + from django.db import models -from django.utils import simplejson as json from django.core.serializers.json import DjangoJSONEncoder diff --git a/safe_django_forms.py b/safe_django_forms.py index bcc07f0..9229a73 100644 --- a/safe_django_forms.py +++ b/safe_django_forms.py @@ -76,8 +76,4 @@ def monkeypatch(): ) for cls in classes: - bases = list(cls.__bases__) - if django.utils.encoding.StrAndUnicode in bases: - idx = bases.index(django.utils.encoding.StrAndUnicode) - bases[idx] = SafeStrAndUnicode - cls.__bases__ = tuple(bases) + cls.__html__ = lambda self: unicode(self)