+# 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
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
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 = {}