I am new to Django and my DeleteView is written like this:
class ObjectDelete(DeleteView):
def post(self, request, *args, **kwargs):
blah blah
return super(ObjectDelete, self).post(request, *args, **kwargs)
I am confused as to how I will delete the object as I have not seen object.delete anywhere in the function.
The actual deleting of objects is done by the
DeletionMixin, which is a parent ofdjango.views.generic.edit.BaseDeleteViewwhich theDeleteViewuses.Here is the
DeletionMixin:It fetches the object to be deleted using
get_object().