From: Radek Czajka Date: Mon, 22 Sep 2014 13:26:33 +0000 (+0200) Subject: Bug fixes. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/a89df185c654948f1c146972270aaccf2d982d38?hp=ad39c2501159fa52e980c95af3e735e36b459c15 Bug fixes. --- diff --git a/apps/catalogue/templates/catalogue/book_detail.html b/apps/catalogue/templates/catalogue/book_detail.html index 398a43c9a..7e8128fa7 100644 --- a/apps/catalogue/templates/catalogue/book_detail.html +++ b/apps/catalogue/templates/catalogue/book_detail.html @@ -22,7 +22,7 @@

{% trans "Other versions" %}:

{% for rel in book.other_versions %} - {% ssi_include 'book_mini' pk=rel.pk %} + {% ssi_include 'catalogue_book_mini' pk=rel.pk %} {% endfor %}
{% endif %} diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index e5514f0db..20518e885 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -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 # ========= diff --git a/apps/funding/templates/funding/offer_list.html b/apps/funding/templates/funding/offer_list.html index feb175d7f..e8088bfa8 100644 --- a/apps/funding/templates/funding/offer_list.html +++ b/apps/funding/templates/funding/offer_list.html @@ -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 %} @@ -24,15 +24,16 @@

{% trans "Previous fundraisers:" %}

{% endif %} - {% funding offer link=1 show_title_calling=False %} + {% ssi_include 'funding_list_bar' pk=offer.pk %}
{% if is_current %}

{% trans "Help free the book!" %}

{{ 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 %} +
{% if is_current and not forloop.last %} diff --git a/apps/polls/templatetags/polls_tags.py b/apps/polls/templatetags/polls_tags.py index fffa78056..38619c108 100644 --- a/apps/polls/templatetags/polls_tags.py +++ b/apps/polls/templatetags/polls_tags.py @@ -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'), )