Browse Source

detail novinky hotovo

master
Pavel Škrabánek 3 years ago
parent
commit
19d29b6a2c
  1. 7
      novinky/templates/novinky/novinka.html
  2. 3
      novinky/views.py

7
novinky/templates/novinky/novinka.html

@ -3,7 +3,12 @@
{% block content %}
<h1>Zde nic neni</h1>
<h1>{{ novinka.titulek }}</h1>
{{ novinka.autor }} <br>
{{ novinka.datum }} <br>
<p>
{{ novinka.zprava }}
</p>
<a href="{% url 'index' %}">zpět</a>

3
novinky/views.py

@ -13,4 +13,5 @@ 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)
Loading…
Cancel
Save