Hallo ihr lieben,
Ich bin auf der Suche nach einem funktionierenden minimalen pagination Beispiel.
Ich möchte eine sehr lange Tabelle in kleinere Päckchen aufteilen. Leider hat bisher kein im Netz gefundenes Beispiel so wirklich funktioniert.
Danke und ein schönes Wochenende!
[Flask] Pagination
IT-News ohne Werbung
https://www.it-feedo.de
https://www.it-feedo.de
So ich habe es jetzt mit DataTables gelöst, es funktioniert genau so wie ich das möcht.
Vielleicht hat trotzdem Jemand einen Ansatz wie man das in purem Python lösen könnte.
Vielleicht hat trotzdem Jemand einen Ansatz wie man das in purem Python lösen könnte.
Code: Alles auswählen
<table id="data" class="table table-striped table-dark" width="100%">
<thead>
<tr>
<th>id</th>
<th>Name</th>
<th>Mail</th>
<th>Link</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
{% for i in content %}
<tr>
<td>{{ i.id }}</td>
<td>{{ i.name }}</td>
<td>{{ i.mail }}</td>
<td><a href="{{ i.link }}">{{ i.link }}</a></td>
<td><input type="checkbox" value="{{ i.id }}" name="select_id"></td>
</tr>
{% endfor %}
</tbody>
</table>
Code: Alles auswählen
<script>
$(document).ready(function() {
$('#data').DataTable( {
"language": {
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/German.json"
}
} );
} );
</script>
IT-News ohne Werbung
https://www.it-feedo.de
https://www.it-feedo.de