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 newitem(request, new_id): novinka = Novinka.objects.get(id=new_id) context = { "novinka": novinka, } return render(request, "novinky/newitem.html", context)