From e140252afe125530e4785d796958ab42fb12988d Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Mon, 25 Jan 2016 17:08:10 +0100 Subject: [PATCH] removed author/genre/kind/period boxes on main page --- src/wolnelektury/templates/main_page.html | 2 ++ src/wolnelektury/views.py | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/wolnelektury/templates/main_page.html b/src/wolnelektury/templates/main_page.html index c037b9f66..f2e6863b7 100755 --- a/src/wolnelektury/templates/main_page.html +++ b/src/wolnelektury/templates/main_page.html @@ -43,6 +43,7 @@ Zobacz katalog motywów + {% comment %}

Autorzy

@@ -74,6 +75,7 @@ Zobacz katalog epok
+ {% endcomment %} {% if collection %}
diff --git a/src/wolnelektury/views.py b/src/wolnelektury/views.py index 49f7b240a..c1792806f 100644 --- a/src/wolnelektury/views.py +++ b/src/wolnelektury/views.py @@ -25,16 +25,16 @@ from ssify import ssi_included def main_page(request): ctx = { 'last_published': Book.objects.exclude(cover_thumb='').filter(parent=None).order_by('-created_at')[:6], + 'theme_books': [] } - for category in ('author', 'epoch', 'genre', 'kind'): - try: - ctx[category] = Tag.objects.filter(category=category).order_by('?')[:1][0] - except IndexError: - pass + # for category in ('author', 'epoch', 'genre', 'kind'): + # try: + # ctx[category] = Tag.objects.filter(category=category).order_by('?')[:1][0] + # except IndexError: + # pass # FIXME: find this theme and books properly. - ctx['theme_books'] = [] if Fragment.objects.count(): while True: ctx['theme'] = Tag.objects.filter(category='theme').order_by('?')[:1][0] -- 2.20.1