X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e5e8226c4d4bd610de5983e69b1b13684a17fe75..8b96e2697a791ce6af5f6b6f38477c0a81dac124:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 9687db6fd..fc27e02f3 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -265,6 +265,7 @@ def book_text(request, slug): book_themes = book_themes.items() book_themes.sort(key=lambda s: s[0].sort_key) + related = book.related_info() return render_to_response('catalogue/book_text.html', locals(), context_instance=RequestContext(request)) @@ -535,6 +536,11 @@ class CustomPDFFormView(AjaxableFormView): submit = ugettext_lazy('Download') honeypot = True + def __call__(self, *args, **kwargs): + if settings.NO_CUSTOM_PDF: + raise Http404('Custom PDF is disabled') + return super(CustomPDFFormView, self).__call__(*args, **kwargs) + def form_args(self, request, obj): """Override to parse view args and give additional args to the form.""" return (obj,), {}