X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/dce4cbe605cb926b5583f7ddd325704b527e7e5c..a3b153ea6e30da275edf3e34b8d2f8ca1bb436cc:/src/catalogue/utils.py?ds=sidebyside diff --git a/src/catalogue/utils.py b/src/catalogue/utils.py index 9461243da..ee3631c76 100644 --- a/src/catalogue/utils.py +++ b/src/catalogue/utils.py @@ -19,7 +19,7 @@ from django.conf import settings from django.core.files.storage import DefaultStorage from django.core.files.uploadedfile import UploadedFile from django.http import HttpResponse -from django.utils.encoding import force_text +from django.utils.encoding import force_str from reporting.utils import read_chunks @@ -200,7 +200,7 @@ def truncate_html_words(s, num, end_text='...'): This is just a version of django.utils.text.truncate_html_words with no space before the end_text. """ - s = force_text(s) + s = force_str(s) length = int(num) if length <= 0: return ''