1
0
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:
Hidden Z 2011-12-23 18:57:42 +00:00
parent 76ee7dbd0e
commit 84836a5079

View File

@ -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 }}">&lt; 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 &gt;</a></span>
{% endif %}
{{ paginator.count }} {% trans "hosts total" %}
{% endif %}
{% endblock %}