Hello!
I have a question… I am carrying out a project in Django, I have created a ListView to display a list of people; how could i delete more people, (selectable via checkbox)?
Hello!
I have a question… I am carrying out a project in Django, I have created a ListView to display a list of people; how could i delete more people, (selectable via checkbox)?
My first thought on this would be to create a formset for the checkbox that is rendered with the list of people, and a submit
button labeled Delete
. When the Delete button is clicked, the formset will be submitted. The form handler can then iterate over all the individual checkboxes and prepare a bulk-delete operation for the selected people.
Thanks. I try and in case I rewrite on this post
Hi.
I managed to do it with a javascrpt script, who send the list of id to the view.