You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
422 B
17 lines
422 B
from django.shortcuts import render
|
|
|
|
from novinky.models import Novinka
|
|
|
|
|
|
# Create your views here.
|
|
def index(request):
|
|
novinky = Novinka.objects.all()
|
|
context = {
|
|
"novinky": novinky,
|
|
}
|
|
return render(request, "novinky/index.html", context)
|
|
|
|
|
|
def novinka(request, novinka_id):
|
|
context = {"novinka": Novinka.objects.get(id=novinka_id),}
|
|
return render(request, "novinky/novinka.html", context)
|