V
V
Vladimir Sokolovsky2015-02-06 14:32:43
Django
Vladimir Sokolovsky, 2015-02-06 14:32:43

How to remove the confirmation page for deleting the list of objects in the standard admin panel?

It takes a very long time to form a page confirming the deletion of several thousand objects, we decided to get rid of this page altogether, but so far there are no ideas how to do it. Maybe someone faced a similar problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Sokolovsky, 2015-02-06
@inlanger

In general, as usual - I killed half a day and did not find a solution until I posted the question. Might be useful to someone:

def delete_selected(modeladmin, request, queryset):
    for obj in queryset:
        obj.delete()

class SomeAdmin(admin.ModelAdmin):
    actions = (delete_selected)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question