X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d1d6ea8ed2889f871b6d89d4fae6021f286f921a..05b7014d1d710937c6a4b5cdccdb4890f377818d:/src/ajaxable/utils.py?ds=sidebyside diff --git a/src/ajaxable/utils.py b/src/ajaxable/utils.py index 89dd0e2d9..8e34a9a57 100755 --- a/src/ajaxable/utils.py +++ b/src/ajaxable/utils.py @@ -6,7 +6,7 @@ from functools import wraps from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden from django.shortcuts import render -from django.utils.encoding import force_unicode +from django.utils.encoding import force_text from django.utils.functional import Promise from django.utils.http import urlquote_plus import json @@ -18,7 +18,7 @@ from honeypot.decorators import verify_honeypot_value class LazyEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, Promise): - return force_unicode(obj) + return force_text(obj) return obj