Fixed showing 'sets' link for authenticated users.
authorMarek Stępniowski <marek@stepniowski.com>
Thu, 4 Sep 2008 11:15:50 +0000 (13:15 +0200)
committerMarek Stępniowski <marek@stepniowski.com>
Thu, 4 Sep 2008 11:15:50 +0000 (13:15 +0200)
catalogue/templatetags/catalogue_tags.py
templates/catalogue/tagged_book_list.html

index d3a25ad..cf4abe7 100644 (file)
@@ -118,7 +118,7 @@ def breadcrumbs(tags, search_form=True):
 
 
 @register.inclusion_tag('catalogue/_book.html')
 
 
 @register.inclusion_tag('catalogue/_book.html')
-def book(book):
+def book(request, book):
     tags = book.tags.filter(~Q(category__in=('set', 'theme')))
     tags = [u'<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name) for tag in tags]
     
     tags = book.tags.filter(~Q(category__in=('set', 'theme')))
     tags = [u'<a href="%s">%s</a>' % (tag.get_absolute_url(), tag.name) for tag in tags]
     
@@ -130,7 +130,7 @@ def book(book):
     if book.odt_file:
         formats.append(u'<a href="%s">Plik ODT</a>' % book.odt_file.url)
         
     if book.odt_file:
         formats.append(u'<a href="%s">Plik ODT</a>' % book.odt_file.url)
         
-    return {'book': book, 'tags': tags, 'formats': formats}
+    return locals()
 
 
 @register.tag
 
 
 @register.tag
index cca0e56..743035b 100644 (file)
@@ -68,7 +68,7 @@
         {% endwith %}
         <ol>
         {% for book in object_list %}
         {% endwith %}
         <ol>
         {% for book in object_list %}
-            <li>{% book book %}</li>
+            <li>{% book request book %}</li>
         {% endfor %}
         </ol>
         {% paginate %}
         {% endfor %}
         </ol>
         {% paginate %}