X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2d538a50605add2666172861744229599487f1b2..e6c778f6e92e584815a14d3e6a31a03a5e2ab7e1:/src/documents/views.py diff --git a/src/documents/views.py b/src/documents/views.py index f4c85612..ecc92199 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(librarian2=True) except: doc = None + else: + try: + stats = doc.get_statistics() + except: + pass return render(request, "documents/book_detail.html", { "book": book, "doc": doc, + "stats": stats, "publishable": publishable, "publishable_error": publish_error, "form": form,