no ssi for book wide
authorJan Szejko <janek37@gmail.com>
Thu, 10 May 2018 15:25:37 +0000 (17:25 +0200)
committerJan Szejko <janek37@gmail.com>
Thu, 10 May 2018 15:25:37 +0000 (17:25 +0200)
src/catalogue/templates/catalogue/book_detail.html
src/catalogue/templates/catalogue/book_wide.html
src/catalogue/views.py

index e3f4d73..22c230b 100644 (file)
@@ -13,7 +13,9 @@
 {% block bodyid %}book-detail{% endblock %}
 
 {% block body %}
-  {% ssi_include 'catalogue_book_wide' pk=book.pk %}
+  {% cache 86400 book_wide book.pk book|status:user %}
+    {% include 'catalogue/book_wide.html' %}
+  {% endcache %}
 
   {% work_list book_children %}
 
index 88cc0be..b4faeab 100644 (file)
@@ -9,8 +9,8 @@
 
 
 {% block cover-area-extra %}
-  {% if extra_info.license %}
-    {% license_icon extra_info.license %}
+  {% if book.extra_info.license %}
+    {% license_icon book.extra_info.license %}
   {% endif %}
 {% endblock %}
 
index 5273ab4..0a5ab58 100644 (file)
@@ -426,17 +426,9 @@ def book_short(request, pk):
     ))(ssi_expect(pk, int)))
 def book_wide(request, pk):
     book = get_object_or_404(Book, pk=pk)
-    extra_info = book.extra_info
 
     return render(request, 'catalogue/book_wide.html', {
         'book': book,
-        'parents': book.parents(),
-        'tags': split_tags(book.tags.exclude(category__in=('set', 'theme'))),
-        'show_lang': book.language_code() != settings.LANGUAGE_CODE,
-
-        'main_link': reverse('book_text', args=[book.slug]) if book.html_file else None,
-        'extra_info': extra_info,
-        'hide_about': extra_info.get('about', '').startswith('http://wiki.wolnepodreczniki.pl'),
     })