MCPcopy Index your code
hub / github.com/encode/django-rest-framework / destroy

Method destroy

rest_framework/mixins.py:89–92  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

87 Destroy a model instance.
88 """
89 def destroy(self, request, *args, **kwargs):
90 instance = self.get_object()
91 self.perform_destroy(instance)
92 return Response(status=status.HTTP_204_NO_CONTENT)
93
94 def perform_destroy(self, instance):
95 instance.delete()

Callers 3

deleteMethod · 0.45
deleteMethod · 0.45
deleteMethod · 0.45

Calls 3

perform_destroyMethod · 0.95
ResponseClass · 0.90
get_objectMethod · 0.45

Tested by

no test coverage detected