Add a soft delete method to a custom QuerySet, then use that as a custom 
Manager for your model.

https://docs.djangoproject.com/en/4.0/topics/db/managers/#creating-a-manager-with-queryset-methods

On June 16, 2022 5:13:29 AM CDT, Sencer Hamarat <sencerhama...@gmail.com> wrote:
>Hi,
>
>The models delete methods overridden by default and has a soft delete
>mechanizm.
>
>I need to add bulk soft delete to the application. I can achieve this with
>iterating over objects to call the soft delete method. But the actual need
>is, soft delete objects filtered by id in bulk way.
>
>Can I do it without iterating the object list?
>
>Regards,
>Sencer HAMARAT
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Django users" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to django-users+unsubscr...@googlegroups.com.
>To view this discussion on the web visit 
>https://groups.google.com/d/msgid/django-users/CACp8TZgOVycb%3DBreJ-sBPxbjaLSNfXMJyG%2B7ozNgkKKFi46%3DvA%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/45D609BA-72FA-4D93-8262-30E836ED781D%40fattuba.com.

Reply via email to