fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor fixes.
[wolnelektury.git]
/
src
/
catalogue
/
views.py
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
ccd51ff
..
007ebe4
100644
(file)
--- a/
src/catalogue/views.py
+++ b/
src/catalogue/views.py
@@
-312,7
+312,12
@@
def book_text(request, slug):
if not book.has_html_file():
raise Http404
if not book.has_html_file():
raise Http404
- return render(request, 'catalogue/book_text.html', {'book': book})
+ with book.html_file.open('r') as f:
+ book_text = f.read()
+ return render(request, 'catalogue/book_text.html', {
+ 'book': book,
+ 'book_text': book_text,
+ })
# =========
# =========
@@
-457,4
+462,4
@@
def ridero_cover(request, slug):
def get_isbn(request, book_format, slug):
book = Book.objects.get(slug=slug)
def get_isbn(request, book_format, slug):
book = Book.objects.get(slug=slug)
- return HttpResponse(book.
extra_info
.get('isbn_%s' % book_format))
+ return HttpResponse(book.
get_extra_info_json()
.get('isbn_%s' % book_format))