This commit is contained in:
Nukeap committed 2024-05-28 20:41:56 +03:00
1 parent f02390275c
commit 35d32bf99b
3 files changed
+47 -29

No files matched your search

+1 -1
View File
@@ -7,5 +7,5 @@ urlpatterns = [
path('calendarEvents/', CalendarEventsAPIView.as_view(), name='calendarEvents'),
path('get_calendars/', GetCalendars.as_view(), name='get_calendars'),
path('exclusionDatas/', ExclusionDatesAPIView.as_view(), name='exclusionDatas'),
path('createEvents/', CreateEventsAPIView.as_view(), name='createEvents')
# path('createEvents/', CreateEventsAPIView.as_view(), name='createEvents')
]
+1 -1
View File
@@ -94,7 +94,7 @@ class GetCalendars(APIView):
calendars = Calendar.objects.filter(get_user__patrcipant_calendar__id=request.user.user.id)
# ПОлученный набор кидаем в сериализатор (название спорное Юзер что-то там....я переименовал, сериализуем мы набор календарей) и говорим, что записей много (many=True)
# Далее про контекст итд - см. сериализаторах
print(request.user.user.id)
return Response(CalendarsSerializer(calendars,context={'request': request},many=True).data)