Answer the question
In order to leave comments, you need to log in
How to force Django admin to delete via QuerySet.delete?
There is a model, it has a manager:
class QuerySet(models.QuerySet):
def delete(self):
self.update(is_delete=True)
class BaseManager(models.Manager):
def get_queryset(self):
return QuerySet(self.model).filter(is_delete=False)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question