行を超えるテーブルを表示するためにテンプレートを使用していますが2000
、これにdjangoページネーションを実装すると、データが多すぎるため速度が遅くなります。これを行うための最良の方法は何ですか。または、ページネーションをロードするにはどうすればよいですか。 1ページあたり200行で、ページを高速化します。ページの読み込みを速くするにはどうすればよいですか
{% extends "base/admin_base.html" %}
{% load pagination_tags %}
{% autopaginate response_dict.taggeddata 100 %}
<div align="right">{% paginate %}</div>
<form action="/users/saveuser/" method="post">{% csrf_token %}
<b>
<table>
<tr><td><font>*</font>Select Category group for tagging</td><td>
<select id="cgroup" onchange="getcategory('1');">
<!--<option value="-1">Select Category group</option> -->
{% for group in response_dict.categorygroup %}
<option value="{{group.id}}">{{group.name}}</option>
{% endfor %}
</select>
</td></tr>
</table>
</b>
<table id="box-table-a">
<colgroup>
<col class="vzebra-odd">
<col class="vzebra-even">
<col class="vzebra-odd">
<col class="vzebra-even">
<col class="vzebra-odd">
<col class="vzebra-even">
<col class="vzebra-odd">
<col class="vzebra-even">
</colgroup>
<thead>
<tr><th id="vzebra-comedy" scope="col">Field1</th><th id="vzebra-adventure" scope="col">Field2</th><th id="vzebra-comedy" scope="col">Field3</th><th id="vzebra-adventure" scope="col">Field4</th><th id="vzebra-comedy" scope="col">Field5</th><th id="vzebra-adventure" scope="col">Field6</th><th id="vzebra-comedy" scope="col">Tag</th><th id="vzebra-adventure" scope="col">Actions</th><thead></tr>
<tbody>
{% for td in response_dict.taggeddata %}
<tr id="{{td.id}}">
<td width="20%">{{td.field1}}</td>
<td>{{td.field2}}</td>
<td>{{td.field3}}</td>
<td>{{td.field4}}</td>
<td>{{td.field5}}</td>
<td>{{td.field6}}</td>
<td class="tg">Select category</td>
<td ><img src="/media/img/cancel.png" alt="delete" height="20" width="20" onclick="delete_row('{{td.id}}')"></td>
</tr>
{% endfor %}
</tbody>
</table>
<input type="button" value="Add" id="addbtn" onclick="validate();"/>
</form>