view gpp/templates/ygroup/pagination.html @ 479:32cec6cd8808

Refactor RateLimiter so that if Redis is not running, everything still runs normally (minus the rate limiting protection). My assumption that creating a Redis connection would throw an exception if Redis wasn't running was wrong. The exceptions actually occur when you issue a command. This is for #224.
author Brian Neal <bgneal@gmail.com>
date Sun, 25 Sep 2011 00:49:05 +0000
parents 0c18dfb1da1c
children
line wrap: on
line source
<div class="pagination">
{% if page_obj.paginator.num_pages == 1 %}
Page 1 of 1
{% else %}
<ul>
{% if page_obj.has_previous %}
<li class="prev"><a href="./?page={{ page_obj.previous_page_number }}" title="Go to page {{ page_obj.previous_page_number }}">&laquo; Previous</a></li>
{% endif %}
{% for num in page_obj.page_range %}
{% if num %}
{% ifequal num page_obj.number %}
<li class="current">{{ num }}</li>
{% else %}
<li class="page"><a href="./?page={{ num }}" title="Go to page {{ num }}">{{ num }}</a></li>
{% endifequal %}
{% else %}
<li>&hellip;</li>
{% endif %}
{% endfor %}
{% if page_obj.has_next %}
<li class="next"><a href="./?page={{ page_obj.next_page_number }}" title="Go to page {{ page_obj.next_page_number }}">Next &raquo;</a></li>
{% endif %}
</ul>
{% endif %}
</div>
<br clear="left" />