@classonlymethod
def as_view(cls, actions=None, **initkwargs):
actions = {'get': 'retrieve', 'put': 'update', 'patch': 'partial_update'}
return super().as_view(actions, **initkwargs)
def get_object(self):
return get_object_or_404(self.get_queryset(), user=self.request.user)