X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/276656dcc680e1a35103d310dea046152ddc3785..69191eddb9e4221d964a7e5b044ff7c5dfe38315:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index eb0e7b95a..20fecb724 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -213,29 +213,9 @@ def book_detail(request, slug): try: book = models.Book.objects.get(slug=slug) except models.Book.DoesNotExist: - return pdcounter_views.book_stub_detail(request, kwargs['slug']) + return pdcounter_views.book_stub_detail(request, slug) - book_tag = book.book_tag() - tags = list(book.tags.filter(~Q(category='set'))) - categories = split_tags(tags) book_children = book.children.all().order_by('parent_number', 'sort_key') - - _book = book - parents = [] - while _book.parent: - parents.append(_book.parent) - _book = _book.parent - parents = reversed(parents) - - theme_counter = book.theme_counter - book_themes = models.Tag.objects.filter(pk__in=theme_counter.keys()) - for tag in book_themes: - tag.count = theme_counter[tag.pk] - - extra_info = book.get_extra_info_value() - hide_about = extra_info.get('about', '').startswith('http://wiki.wolnepodreczniki.pl') - - custom_pdf_form = forms.CustomPDFForm() return render_to_response('catalogue/book_detail.html', locals(), context_instance=RequestContext(request)) @@ -585,7 +565,7 @@ class CustomPDFFormView(AjaxableFormView): request.GET['next'] = "%s?%s" % (reverse('catalogue.views.download_custom_pdf', args=[request.GET['slug']]), request.POST.urlencode()) return super(CustomPDFFormView, self).__call__(request) - + def success(self, *args): pass