In Django rest-framework , is it possible to bundle original callback like def copy? [duplicate]

I have a Django framework bundle it works for model.

For example,

class DrawingViewSet(viewsets.ModelViewSet)
    def list(self, request):
    def destroy(self, request, *args, **kwargs):
    def update(self,request,*args,**kwargs):

And each function is called by POST DELETE PATCH GET

For example:

/api/drawing/13

Then now I want to make the function named copy, such as by calling: /api/drawing/copy/13

Then, with this query:

class DrawingViewSet(viewsets.ModelViewSet)
    def copy(self, request, *args, **kwargs):
        // do some action.

Is it possible to set the original call back on viewsets.ModelViewSet?

Back to Top