class ResourceSetView(viewsets.ModelViewSet):
queryset = models.Resources.objects.all()
serializer_class = serializers.ResourceSerializer
def list(self, request, *args, **kwargs):
queryset = models.Resources.objects.all() # import
serializer = serializers.ResourceSerializer(queryset, many=True)
return Response({'data': serializer.data})