uspješna skripta, pokušaj rendera

This commit is contained in:
2024-01-10 12:29:03 +01:00
parent 6994f43490
commit c5fb12ffb8
9 changed files with 19 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

View File

@@ -1,11 +1,12 @@
from django.shortcuts import render
# Create your views here.
from rest_framework import viewsets
from .models import ObjektSigurnosti
from .serializers import ObjektSigurnostiSerializer
def home(request):
return render(request, 'base.html')
class ObjektSigurnostiViewSet(viewsets.ModelViewSet):
queryset = ObjektSigurnosti.objects.all()
serializer_class = ObjektSigurnostiSerializer