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