X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/634abe44a671e272552f0016155211ae91be09de..042546599575e59a9cb74c91194e3e3af4824447:/src/documents/views.py?ds=inline diff --git a/src/documents/views.py b/src/documents/views.py index 225ad559..0fbb3b9f 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -362,14 +362,21 @@ def book(request, slug): publish_error = book.publishable_error() publishable = publish_error is None + stats = None try: - doc = book.wldocument() + doc = book.wldocument(librarian2=True) except: doc = None - + else: + try: + stats = doc.get_statistic() + except: + pass + return render(request, "documents/book_detail.html", { "book": book, "doc": doc, + "stats": stats, "publishable": publishable, "publishable_error": publish_error, "form": form,