Праздник

This commit is contained in:
iriska-gri committed 2023-11-22 17:01:21 +03:00
1 parent 11c78a7548
commit 075aa18b32
15 files changed
+103 -63

No files matched your search

+9 -1
View File
@@ -1,3 +1,11 @@
from django.shortcuts import render
from rest_framework.generics import ListAPIView
from .models import *
from rest_framework.response import Response
from .serializers import *
# class CaorusAPIView(CarouselsAPIView(ListAPIView):)
class CaorusAPIView(ListAPIView):
def get(self, request):
queryset = Carousels.objects.using('add_base').all().order_by('order')
print(queryset, '----------------queryset')
return Response(CarouselsSerializer(queryset, many=True).data)