Добавлена структура инспекции на VueFlow
This commit is contained in:
1 parent
45d86dde41
commit
5b5694a72a
11 files changed
+626
-19
No files matched your search
@@ -1,3 +1,27 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
from rest_framework.generics import ListAPIView
|
||||
from django.db.models import Q
|
||||
from userauth.models import DictEmployee
|
||||
from datetime import date
|
||||
from .models import *
|
||||
from .serializers import *
|
||||
from rest_framework.response import Response
|
||||
# Create your views here.
|
||||
|
||||
class GetFactSize(ListAPIView):
|
||||
def get(self, request):
|
||||
fact_size = DictEmployee.objects.filter(Q(deleteddate__isnull= True)).count()
|
||||
print(fact_size)
|
||||
return Response({'fact_size':fact_size})
|
||||
|
||||
|
||||
class GetStateSize(ListAPIView):
|
||||
def get(self, request):
|
||||
state_size = StateSize.objects.latest('date_created')
|
||||
return Response(StateSizeSerializer(state_size).data)
|
||||
|
||||
|
||||
class GetInspectionDirections(ListAPIView):
|
||||
queryset = InspectionDirections.objects.all()
|
||||
serializer_class = InspectionDirectionsSerializer
|
||||
# отключает вывод информации о пагинации(count,previous,next, results)
|
||||
paginator = None
|
||||
Reference in new issue
Block a user