X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d1d6ea8ed2889f871b6d89d4fae6021f286f921a..45b3f39b2548169718f640227d3c09064cdfa9cb:/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