From 19d29b6a2c7d9314366b540919c220f1a44d058c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0krab=C3=A1nek?= Date: Fri, 3 Dec 2021 09:19:34 +0100 Subject: [PATCH] detail novinky hotovo --- novinky/templates/novinky/novinka.html | 7 ++++++- novinky/views.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/novinky/templates/novinky/novinka.html b/novinky/templates/novinky/novinka.html index d9fbb12..b5710af 100644 --- a/novinky/templates/novinky/novinka.html +++ b/novinky/templates/novinky/novinka.html @@ -3,7 +3,12 @@ {% block content %} -

Zde nic neni

+

{{ novinka.titulek }}

+{{ novinka.autor }}
+{{ novinka.datum }}
+

+ {{ novinka.zprava }} +

zpět diff --git a/novinky/views.py b/novinky/views.py index 15b19d1..63afef4 100644 --- a/novinky/views.py +++ b/novinky/views.py @@ -13,4 +13,5 @@ def index(request): def novinka(request, novinka_id): - return render(request, "novinky/novinka.html") \ No newline at end of file + context = {"novinka": Novinka.objects.get(id=novinka_id),} + return render(request, "novinky/novinka.html", context) \ No newline at end of file