X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/634abe44a671e272552f0016155211ae91be09de..51c6366416694fe151fdcea3d9da7a06a08f7ef1:/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,