I have a table of users and one table data is a button that opens up a modal, I am including the modal in the tamplate with the include tag. How do I pass the user from the row in which the button was clicked to the include tag?
{% for user in users %}
<tr>
<td>
<button class="btn btn-lg device-select-button">
<span>Select Device</span>
</button>
</td>
</tr>
{% endfor %}
{% include 'app/admin/users/device_select_modal.html' user={{add here user}} %}
In other implementation I have generated a modal for each row, and it works but slow, So I want to reimplement that