58👍
✅
The problem is that you’re sending the serializer itself, rather than the serialized data, to the response. You should change it to:
self.data = objects.data
But that said, most of this code is totally unnecessary, You’re bypassing most of .he things that Django and DRF do for you already. Remove your mixin and use a ListAPIView.
Source:stackexchange.com