@ -3,7 +3,12 @@
{% block content %}
Toto je novinka
<h1>{{ novinka.titulek }}</h1>
{{ novinka.autor }} <br>
{{ novinka.datum }} <br>
<p>
{{ novinka.zprava }}
</p>
<a href="{% url 'index' %}">zpět</a>
@ -13,5 +13,7 @@ def index(request):
def novinka(request, novinka_id):
return render(request, "novinky/novinka.html")
context = {
"novinka": Novinka.objects.get(id=novinka_id),
}
return render(request, "novinky/novinka.html", context)