Re: [Django] #34802: django.contrib.admin.actions.delete_selected() should return number of rows deleted via ModelAdmin.delete_queryset()

5 views
Skip to first unread message

Django

unread,
Aug 29, 2023, 9:03:58 AM8/29/23
to django-...@googlegroups.com
#34802: django.contrib.admin.actions.delete_selected() should return number of rows
deleted via ModelAdmin.delete_queryset()
---------------------------------+--------------------------------------
Reporter: Wicher Minnaard | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------

Comment (by Wicher Minnaard):

Replying to [comment:2 Mariusz Felisiak]:
> Thanks for the ticket, however `delete_queryset()` was added to change a
deletion process not to change a list of objects to be deleted (as
documented), e.g. use `Model.delete()` instead of a bulk deletion. IMO,
any implicit queryset modification can be confusing for users and will
brake other things as `log_deletion()`. I have doubts the described use
case should be supported.

Yes. I recognize that objection, it's discussed in the discussion section.
So solution 2 (the quick patch) is out the window.
Did you have any considerations for solution 1, which does not involve
`delete_queryset()`?

> Please first start a discussion on the DevelopersMailingList, where
you'll reach a wider audience and see what other think, and
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features follow the guidelines with regards to
requesting features].

I'll consider, thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/34802#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages