I have a simple table generated from Django template variable:
{% for object in object_list %}
<tr>
<td>{{object.first_name}}</td>
<td>{{object.last_name}}</td>
<td>{{object.tel}}</td>
</tr>
{% endfor %}
I’m making insert to this model and the server side is done, but how to add a new row in top of this table?
With this method: var row = table.insertRow(0)?
or can I change this variable ‘object_list’ and row will be added automatically?
This simple solution ‘var row = table.insertRow(0);’ is not adding columns with CSS classes.
New contributor
Habbo’s Dreams is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.