I\'m using Django 2.0 and Django REST Framework
Django 2.0
Django REST Framework
I have created an action method to delete particular object from database
conta
@action(methods=['delete'], detail=True) def delete_phone(self, request, pk=None): contact = get_object_or_404(self.get_queryset(), pk=pk) contact.delete() return Response({'status': 'success'})
this should work.