mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 04:24:15 +00:00
Simplify pagination in browse.html
Our old pagination is incompatible with new class-based generic views, so switch to internal django pagination for some time.
This commit is contained in:
parent
76ee7dbd0e
commit
84836a5079
@ -16,7 +16,20 @@
|
||||
</table>
|
||||
|
||||
{% if is_paginated %}
|
||||
{% load paginator %}{% paginator 3 %}
|
||||
<div class="pager">
|
||||
{% if page_obj.has_previous %}
|
||||
<span class="page">
|
||||
<a href="?page={{ page_obj.previous_page_number }}">< Prev</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="current">Page {{ page_obj.number }} of {{ paginator.num_pages }}</span>
|
||||
|
||||
{% if page_obj.has_next %}
|
||||
<span class="page"><a href="?page={{ page_obj.next_page_number }}">Next ></a></span>
|
||||
{% endif %}
|
||||
{{ paginator.count }} {% trans "hosts total" %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user