X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f16104e5ce08700745c66caf77c2e6403243059c..ad2f309daa381e9a7a2b7a8a17ef494b60f838b2:/src/catalogue/views.py diff --git a/src/catalogue/views.py b/src/catalogue/views.py index ab1f8214..019d25a7 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -1,3 +1,6 @@ +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from collections import defaultdict from datetime import datetime, date, timedelta import logging @@ -8,7 +11,7 @@ from django.conf import settings from django.contrib import auth from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required, permission_required -from django.core.urlresolvers import reverse +from django.urls import reverse from django.db.models import Count, Q from django.db import transaction from django import http @@ -247,7 +250,7 @@ def book_html(request, slug): doc = book.wldocument(parse_dublincore=False) html = doc.as_html(options={'gallery': "'%s'" % book.gallery_url()}) - html = html.get_bytes() if html is not None else '' + html = html.get_bytes().decode('utf-8') if html is not None else '' # response = http.HttpResponse(html, content_type='text/html') # return response # book_themes = {}