fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[redakcja.git]
/
src
/
documents
/
views.py
diff --git
a/src/documents/views.py
b/src/documents/views.py
index
225ad55
..
ecc9219
100644
(file)
--- 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
publish_error = book.publishable_error()
publishable = publish_error is None
+ stats = None
try:
try:
- doc = book.wldocument()
+ doc = book.wldocument(
librarian2=True
)
except:
doc = None
except:
doc = None
-
+ else:
+ try:
+ stats = doc.get_statistics()
+ except:
+ pass
+
return render(request, "documents/book_detail.html", {
"book": book,
"doc": doc,
return render(request, "documents/book_detail.html", {
"book": book,
"doc": doc,
+ "stats": stats,
"publishable": publishable,
"publishable_error": publish_error,
"form": form,
"publishable": publishable,
"publishable_error": publish_error,
"form": form,