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
In views.py, your viewset have to inherit from viewset and use it in your viewset try code below:
class SessionViewSet(viewsets.ModelViewSet): queryset = Session.objects.all() serializer_class = SessionSerializer def get(self, request, format=None): return Response("test")