fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[wolnelektury.git]
/
src
/
catalogue
/
views.py
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
b4ac30f
..
cfed6ca
100644
(file)
--- a/
src/catalogue/views.py
+++ b/
src/catalogue/views.py
@@
-19,6
+19,7
@@
from django.views.decorators.cache import never_cache
from ajaxable.utils import AjaxableFormView
from club.models import Membership
from ajaxable.utils import AjaxableFormView
from club.models import Membership
+from annoy.models import DynamicTextInsert
from pdcounter import views as pdcounter_views
from picture.models import Picture, PictureArea
from catalogue import constants
from pdcounter import views as pdcounter_views
from picture.models import Picture, PictureArea
from catalogue import constants
@@
-312,7
+313,14
@@
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,
+ 'inserts': DynamicTextInsert.objects.all()
+ })
# =========
# =========