I am working with Django for a first time and I\'m trying to build an API and I am following some tutorials and examples and it works right, but I am running the project now
For:
djangorestframework==3.11.0
Django==2.2.9
You need to change class SessionViewSet(APIView):
to:
from rest_framework import mixins, viewsets
class SessionViewSet(mixins.ListModelMixin,
viewsets.GenericViewSet):
To get it to work. The internals of DRF have changed a bit and the other solutions won't cut it any longer.