【发布时间】:2020-11-01 07:05:25
【问题描述】:
我正在制作 Django 网络应用程序。我在其中使用了这个datatable。我的页面中有四个数据表。他们都在工作,但在确定的列数上说 6。当我插入第 7 列时,搜索和分页从该表中消失。 我很困惑这个问题是特定于数据表还是其他问题。
在下面给出的这段代码中,分页和搜索消失了,但是当我删除最后一列和最后一列数据时,它会出现。
<table id="confirmedDeliveries" class="ui celled table responsive nowrap unstackable" style="width:100%">
<thead>
<tr>
<th>Requested By</th>
<th>Contact</th>
<th>Date Requested</th>
<th>From</th>
<th>To</th>
<th>Required Delivery Date</th>
<th align="center" colspan="2">Action</th>
</tr>
</thead>
<tbody class="new_requests">
{% for delivery in confirmed %}
<tr>
<td>{{delivery.request.user}}</td>
<td>{{delivery.request.contact}}</td>
<td>{{delivery.request.date_requested}}</td>
<td>{{delivery.request.from_address}}</td>
<td>{{delivery.request.to_address}}</td>
<td>{{delivery.request.required_delivery_date}}</td>
<td><button class="btn btn-danger btn-sm" id="cancel_request" data-id="{{delivery.id}}">Cancel</button></td>
<td><button class="btn btn-info btn-sm" id="done_request" data-id="{{delivery.id}}">Delivered</button></td>
</tr>
{% endfor %}
</tbody>
</table>
任何见解都将是可观的。
【问题讨论】:
标签: jquery django datatables