0

Is it possible to get a list of all deleted items in a django model without the use of safedelete or softdelete?

django deleted records

5th Apr 2022, 9:03 AM
Ptar*
Ptar* - avatar
1 Odpowiedź
+ 2
No answer for your question, but maybe it helps: Add a boolean field like is_deleted to your model. Create a manager for the model and override the get_queryset method to filter the models where is_deleted=False and set objects=YourManager in your model. Finally override the delte method to set is_deleted=False instead of actually deleting it.
5th Apr 2022, 4:18 PM
Fu Foy
Fu Foy - avatar