From 84836a5079122e898c9b45fc67be40a6d0b39d44 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Fri, 23 Dec 2011 18:57:42 +0000 Subject: [PATCH] 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. --- pyi2phosts/templates/browse.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pyi2phosts/templates/browse.html b/pyi2phosts/templates/browse.html index be19af3..d17a54b 100644 --- a/pyi2phosts/templates/browse.html +++ b/pyi2phosts/templates/browse.html @@ -16,7 +16,20 @@ {% if is_paginated %} - {% load paginator %}{% paginator 3 %} +
+ {% if page_obj.has_previous %} + + < Prev + + {% endif %} + + Page {{ page_obj.number }} of {{ paginator.num_pages }} + + {% if page_obj.has_next %} + Next > + {% endif %} + {{ paginator.count }} {% trans "hosts total" %} + {% endif %} {% endblock %}