Bug fixes.
authorRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Mon, 22 Sep 2014 13:26:33 +0000 (15:26 +0200)
committerRadek Czajka <radekczajka@nowoczesnapolska.org.pl>
Mon, 22 Sep 2014 13:26:33 +0000 (15:26 +0200)
apps/catalogue/templates/catalogue/book_detail.html
apps/catalogue/views.py
apps/funding/templates/funding/offer_list.html
apps/polls/templatetags/polls_tags.py

index 398a43c..7e8128f 100644 (file)
@@ -22,7 +22,7 @@
 <section class="see-also" style="display: inline-block;">
 <h1>{% trans "Other versions" %}:</h1>
 {% for rel in book.other_versions %}
-    {% ssi_include 'book_mini' pk=rel.pk %}
+    {% ssi_include 'catalogue_book_mini' pk=rel.pk %}
 {% endfor %}
 </section>
 {% endif %}
index e5514f0..20518e8 100644 (file)
@@ -59,7 +59,7 @@ def catalogue(request, as_json=False):
     collections = models.Collection.objects.all()
 
     def render_tag_list(tags):
-        render_to_string('catalogue/tag_list.html', tag_list(tags))
+        return render_to_string('catalogue/tag_list.html', tag_list(tags))
 
     def render_split(with_books, with_pictures):
         ctx = {}
@@ -212,7 +212,7 @@ def tagged_object_list(request, tags=''):
         all_books = models.Book.tagged.with_all(tags)
         if shelf_is_set:
             books = all_books.order_by('sort_key_author', 'title')
-            pictures = Pictures.objects.none()
+            pictures = Picture.objects.none()
             related_book_tags = models.Tag.objects.usage_for_queryset(
                 books, counts=True).exclude(
                 category='set').exclude(pk__in=tags_pks)
@@ -531,7 +531,10 @@ def json_tags_starting_with(request, callback=None):
         result = [prefix, tags_list]
     else:
         result = {"matches": tags_list}
-    return JsonResponse(result, callback)
+    response = JsonResponse(result, safe=False)
+    if callback:
+        response.content = callback + "(" + response.content + ");"
+    return response
 
 
 # =========
index feb175d..e8088bf 100644 (file)
@@ -1,7 +1,7 @@
 {% extends "base.html" %}
 {% load url from future %}
 {% load i18n %}
-{% load funding_tags %}
+{% load ssi_include from ssify %}
 {% load pagination_tags %}
 
 {% block titleextra %}{% trans "All fundraisers" %}{% endblock %}
         <h2>{% trans "Previous fundraisers:" %}</h2>
     {% endif %}
 
-    {% funding offer link=1 show_title_calling=False %}
+    {% ssi_include 'funding_list_bar' pk=offer.pk %}
 
     <div class="white-box normal-text">
         {% if is_current %}
             <h3>{% trans "Help free the book!" %}</h3>
             {{ offer.description|safe }}
         {% endif %}
-        {% offer_status offer %}
-        {% offer_status_more offer %}
+        {% ssi_include 'funding_status' pk=offer.pk %}
+        {% ssi_include 'funding_status_more' pk=offer.pk %}
+
     </div>
 
     {% if is_current and not forloop.last %}
index fffa780..38619c1 100644 (file)
@@ -18,5 +18,6 @@ def poll(context, poll, show_results=True, redirect_to=''):
                 form=form,
                 voted_already=voted_already,
                 vote_count=poll.vote_count,
-                show_results=show_results
+                show_results=show_results,
+                request=context.get('request'),
            )