Feature Req:"Soft Delete"
|Reported by:||Yuchen Ying||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It's very common that when we delete items from database, we just mark it as deleted and do a cleanup occasionally. I don't know what the proper name is but I usually call it "soft delete".
Now if you want to add "soft delete" feature in django, you need to:
- Override model.delete()
- Override QuerySet.delete() since bulk delete doesn't call model.delete()
- Override model.Manager.get_query_set() if you want to "hide" deleted items
Well, I think this should be done by django itself :-)