This commit is contained in:
Andrei Filippov committed 2024-05-27 15:34:28 +03:00
1 parent e315e2824a
commit 910f2f971c
6 files changed
+97 -4

No files matched your search

+11 -1
View File
@@ -2,6 +2,7 @@ from django.shortcuts import render
from .serializers import *
from .models import *
from rest_framework.views import APIView
from rest_framework.generics import ListAPIView
from rest_framework.response import Response
import json
@@ -59,4 +60,13 @@ class CalendarEventsAPIView(APIView):
return Response('ru')
return Response('ru')
class GetCalendars(ListAPIView):
def get(self, request):
queryset = Calendar.objects.filter(user = request.user)
return Response(CalendarSerializer(queryset, many=True).data)