[Answered ]-DJANGO ListView returns HTTPResponse, but I need a json

1👍

You can make use of a ListAPIView and specify your SpendingConfigSerializer as serializer:

from rest_framework import generics

class UserList(generics.ListCreateAPIView):
    queryset = SpendingConfig.objects.all()
    serializer_class = SpendingConfigSerializer

Leave a comment