X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ff928e937ca4498faa2b51e9ee818499fbcc8eaf..42b2bed693f41819b314b54cbfea1f51ec5d0aad:/src/catalogue/views.py

diff --git a/src/catalogue/views.py b/src/catalogue/views.py
index b4ac30f86..007ebe470 100644
--- 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
-    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,
+    })
 
 
 # =========