Answer the question
In order to leave comments, you need to log in
How to dynamically update data in Django + ajax table?
There is a table:
<table class="table table-striped" id="tables">
{% for field in response %}
<tr>
<td>{{ field.value }}</td>
<td>{{ field.date }}</td>
<td><input name="checkd" type="button" value="Подтвердить" class="btn btn-success"
data-trans-id="{{ field.id }}" data-url="{% url "dashboard:change_valid" %}"
data-valid="False"/></td>
<td><input name="delete" type="button" value="Удалить" class="btn btn-danger"
data-trans-id="{{ field.id }}" data-url="{% url "dashboard:delete" %}"
/></td>
</tr>
{% endfor %}
function(data){
$('#tables').html(data)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question