Fixes.
authorRadek Czajka <rczajka@rczajka.pl>
Wed, 7 Aug 2019 09:18:12 +0000 (11:18 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Wed, 7 Aug 2019 09:18:12 +0000 (11:18 +0200)
src/catalogue/templates/catalogue/book_text.html
src/catalogue/views.py
src/wolnelektury/templates/annoy.html

index b0e2f9c..a1c0b23 100644 (file)
@@ -60,7 +60,7 @@
 {% block big-pane %}
 
   <article id="main-text">
-    {{ book.html_file.read|safe }}
+    {{ book_text|safe }}
   </article>
 
   <article id="other-text">
index b4ac30f..007ebe4 100644 (file)
@@ -312,7 +312,12 @@ def book_text(request, slug):
 
     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,
+    })
 
 
 # =========
index 4d53500..8b2f8e3 100644 (file)
@@ -15,7 +15,7 @@
     <p><a href="http://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">Dowiedz się więcej</a></p-->
     <p>
     <a href="/towarzystwo/">
-        Wolne Lektury potrzebują pomocy! Wesprzyj bezpłatną bibliotekę internetową i przeczytaj opowiadanie Pawła Sołtysa napisane specjalnie dla Ciebie.
+       Wolne Lektury potrzebują pomocy! Wesprzyj bezpłatną bibliotekę internetową i przeczytaj utwory napisane specjalnie dla Ciebie.
     </a>
     </p>