Пример #1
0
 def destroy(self, request, *args, **kwargs):
     from documents import index
     index.remove_document_from_index(self.get_object())
     return super(DocumentViewSet, self).destroy(request, *args, **kwargs)
Пример #2
0
 def delete_model(self, request, obj):
     from documents import index
     index.remove_document_from_index(obj)
     super(DocumentAdmin, self).delete_model(request, obj)