X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9a7603cfbfdf7c0b4a2210ef454cecf894c5e172..0c9e7e914bc548bee30add46fb6e4aadf6ffb16c:/apps/catalogue/views.py?ds=inline diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index e9b1465dd..50b6e3e73 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -289,6 +289,14 @@ def book_text(request, slug): related = book.related_info() return render_to_response('catalogue/book_text.html', locals(), context_instance=RequestContext(request)) +def book_text2(request, slug): + book = get_object_or_404(models.Book, slug=slug) + + if not book.has_html_file(): + raise Http404 + related = book.related_info() + return render_to_response('catalogue/book_text_new.html', locals(), + context_instance=RequestContext(request)) # ==========