Re: Disabling .delete() in querysets in Django

2020-05-20 Thread Javier Buzzi
More to Tom's point, I'm currently working on an old app that the original intent was to never delete anything, ever. The original programmers did something similar to what you did with the exception that they added a "deleted_ts" field to every model, the model/queryset delete() would just ad

Re: Disabling .delete() in querysets in Django

2020-05-20 Thread Tim Graham
Hi Uri, I think you've mostly come across documented behaviors rather than "problems". You haven't provided enough details in the bug report to say for sure on that issue. I don't think the things you've implemented are generally applicable to many Django projects such that they warrant the ad

Re: Disabling .delete() in querysets in Django

2020-05-20 Thread Tom Forbes
I don’t think a Django-wide setting to disable Queryset.delete() is appropriate. As you said, it’s easy enough to configure for the specific models that may (or may not!) benefit from this. A Django-wide setting like this would also break just about everything that calls “delete()” on a querys

Re: Disabling .delete() in querysets in Django

2020-05-20 Thread Javier Buzzi
> I can still delete objects from our admin interface, so it probably doesn't use the delete() queryset. I think you should look at https://github.com/django/django/blob/master/django/contrib/admin/options.py#L1095-L1103 Individual objects are deleted individually, using the object.delete() --