From: Radek Czajka Date: Wed, 7 Aug 2019 09:18:12 +0000 (+0200) Subject: Fixes. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/42b2bed693f41819b314b54cbfea1f51ec5d0aad Fixes. --- diff --git a/src/catalogue/templates/catalogue/book_text.html b/src/catalogue/templates/catalogue/book_text.html index b0e2f9c77..a1c0b23f9 100644 --- a/src/catalogue/templates/catalogue/book_text.html +++ b/src/catalogue/templates/catalogue/book_text.html @@ -60,7 +60,7 @@ {% block big-pane %}
- {{ book.html_file.read|safe }} + {{ book_text|safe }}
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, + }) # ========= diff --git a/src/wolnelektury/templates/annoy.html b/src/wolnelektury/templates/annoy.html index 4d53500a5..8b2f8e39f 100644 --- a/src/wolnelektury/templates/annoy.html +++ b/src/wolnelektury/templates/annoy.html @@ -15,7 +15,7 @@

Dowiedz się więcej

- 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.