fixes
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 30 Dec 2019 23:41:41 +0000 (00:41 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 30 Dec 2019 23:41:41 +0000 (00:41 +0100)
src/catalogue/views.py
src/picture/templates/picture/picture_viewer.html

index b110b01..2ef0d3b 100644 (file)
@@ -205,7 +205,7 @@ def theme_list(request, tags, list_type):
         # TODO: Pictures on shelves not supported yet.
         books = Book.tagged.with_all(shelf_tags).order_by()
         fragments = fragments.filter(Q(book__in=books) | Q(book__ancestor__in=books))
         # TODO: Pictures on shelves not supported yet.
         books = Book.tagged.with_all(shelf_tags).order_by()
         fragments = fragments.filter(Q(book__in=books) | Q(book__ancestor__in=books))
-    else:
+    elif list_type == 'books':
         fragments = fragments.filter(book__findable=True)
 
     if not fragments and len(tags) == 1 and list_type == 'books':
         fragments = fragments.filter(book__findable=True)
 
     if not fragments and len(tags) == 1 and list_type == 'books':
index 3bd27b6..7a13650 100644 (file)
@@ -80,7 +80,7 @@
 
 
 {% block footer %}
 
 
 {% block footer %}
-  {{ picture.html_file.read|safe }}
+  {{ picture.html_file.read.decode|safe }}
 
   <div id="info" class="box">
     <div class="sponsors">
 
   <div id="info" class="box">
     <div class="sponsors">