【发布时间】:2021-10-30 21:54:41
【问题描述】:
我正在使用 django。这是我的代码:
<div class="card-body">
<div class="table-responsive">
<table id="datatables" class="table table-striped table-bordered text-nowrap w-100">
<thead>
<tr>
<th class="wd-15p">devEUI</th>
<th class="wd-15p">appID</th>
<th class="wd-20p">Type machine</th>
<th class="wd-20p">Date création</th>
</tr>
</thead>
<tbody>
{% for machine in machines %}
<tr>
<a href="{% url 'details_of_element' %}">
<td>{{machine.devEUI}}</td>
<td>{{machine.appID}}</td>
<td>{{machine.type_machine}}</td>
<td>{{machine.date_creation}}</td>
</a>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
它不起作用。我想为每一行添加一个链接以查看每个项目的详细信息。我如何使用 django、jquery 或 javascript 做到这一点?
【问题讨论】:
标签: javascript jquery django