Группировка по папкам

This commit is contained in:
iriska-gri committed 2023-09-27 08:56:00 +03:00
1 parent 17f35a0f5d
commit 7cba2e0366
880 files changed
+11 -146079

No files matched your search

-17
View File
@@ -1,17 +0,0 @@
from rest_framework.response import Response
import datetime
from .serializers import *
from .models import *
from rest_framework.views import APIView
class GeneralVacationAPIView(APIView):
def get(self, request):
general = GeneralVacation.objects.all()
# Сериализуем извлечённый набор записей
serializer_for_basecrit = GeneralVacationSerializer(
instance=general, # Передаём набор записей
many=True # Указываем, что на вход подаётся именно набор записей
)
return Response({"Отпуск": serializer_for_basecrit.data})