I have few Viewsets inheriting viewsets.ViewSet
and contain override list()
method. I have registered all these Viewsets on API page.
Now I have one more viewset which override update()
but I am not able to see it on API page.
This is my code:
class ReadNotificationsAPI(viewsets.ViewSet):
"""
Custom API for to mark notifications as read by recipient
"""
permission_classes = (IsAuthenticated,)
def update(self, request, pk=None):
# some operations
response_obj = {'response': 'success'}
return Response(response_obj, status=status.HTTP_200_OK)
entry in routers:
router.register(r'readnotificationsapi', notification_views.ReadNotificationsAPI, 'readnotificationsapi')
Other custom views that only have list()
are visible on API page, but not this one.
Any help?