From: Jan Szejko Date: Mon, 25 Jan 2016 16:08:10 +0000 (+0100) Subject: removed author/genre/kind/period boxes on main page X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e140252afe125530e4785d796958ab42fb12988d?hp=e56c4341bbe30634e9f44871b4259a28ffc3f1b9 removed author/genre/kind/period boxes on main page --- 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]