From 307e2c65ef1caf8adae53582177912cef6f9ec51 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Thu, 4 Sep 2008 13:15:50 +0200 Subject: [PATCH] Fixed showing 'sets' link for authenticated users. --- catalogue/templatetags/catalogue_tags.py | 4 ++-- templates/catalogue/tagged_book_list.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/catalogue/templatetags/catalogue_tags.py b/catalogue/templatetags/catalogue_tags.py index d3a25ad93..cf4abe718 100644 --- a/catalogue/templatetags/catalogue_tags.py +++ b/catalogue/templatetags/catalogue_tags.py @@ -118,7 +118,7 @@ def breadcrumbs(tags, search_form=True): @register.inclusion_tag('catalogue/_book.html') -def book(book): +def book(request, book): tags = book.tags.filter(~Q(category__in=('set', 'theme'))) tags = [u'%s' % (tag.get_absolute_url(), tag.name) for tag in tags] @@ -130,7 +130,7 @@ def book(book): if book.odt_file: formats.append(u'Plik ODT' % book.odt_file.url) - return {'book': book, 'tags': tags, 'formats': formats} + return locals() @register.tag diff --git a/templates/catalogue/tagged_book_list.html b/templates/catalogue/tagged_book_list.html index cca0e56d4..743035bb8 100644 --- a/templates/catalogue/tagged_book_list.html +++ b/templates/catalogue/tagged_book_list.html @@ -68,7 +68,7 @@ {% endwith %}
    {% for book in object_list %} -
  1. {% book book %}
  2. +
  3. {% book request book %}
  4. {% endfor %}
{% paginate %} -- 2.20.1