Answer the question
In order to leave comments, you need to log in
How to make a form for selecting records from a database in django?
How to make a data selection form from the database, for example, as in the admin panel:
So that you can select several records from the table and do something with them, for example, delete or move
Answer the question
In order to leave comments, you need to log in
If I understood you correctly, then you need to add in the template where you will display the entries
<input type=“checkbox” value=“{{ entry.id }}” name=“delete”>
next to each entry, where value is the ID of your entry (ID of the entry in the database) that you want to operate on, and name is the name by which you will pull the values of this input from the query. Note. entries = request.GET.get_list(“delete”)
<form action=“url” method=“get”>
•••
<\form>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question