How to add a checkbox column in your Django template

I have a Django application, I want to show pandas dataframe in my template, so I parse it using df.to_html() and pass it in the render, and show it in my template using <table>{{data|safe}}</table>, my data is displayed as I expect, but I want some modification, I want an extra column in my data frame, each cell in that column will have a checkbox, user can check/uncheck it. I want to get information that which cells are checked so I display some more information about those rows.

What I have: enter image description here What I want: enter image description here

Back to Top