fine tuning the page numbers displayed
if the last page isn't displayed, which is most of the time, a '...' before 'Next page' is shown
{{ object_list.next_page_number }}
</a>
</li>
- {% endif %}
- {% with object_list.number as current_page %}
- {% if object_list.number|add:'10' < object_list.paginator.num_pages %}
+ {% if object_list.number|add:'1' != object_list.paginator.num_pages %}
<li>
<a>
...
</a>
</li>
+ {% endif %}
+ {% endif %}
+ {% with object_list.number as current_page %}
+ {% if object_list.number|add:'10' < object_list.paginator.num_pages %}
{% if object_list.paginator.num_pages >= current_page|add:'9' %}
<li>
<a href="?page={{ current_page | add:"9" }}{% if filters %}{% for filter in filters %}{% if forloop.counter0 == 0 %}&Editor={{ filter.object.pk|safe }}{% elif forloop.counter0 == 1 %}&Partner={{ filter.object.pk|safe }}{% endif %}{% endfor %}{% else %}{% endif %}">
{{ current_page | add:"11" }}
</a>
</li>
+ {% if object_list.paginator.num_pages != current_page|add:'11' %}
+ <li>
+ <a>
+ ...
+ </a>
+ </li>
+ {% endif %}
{% endif %}
{% endif %}
{% endwith %}
</a>
</li>
{% endfor %}
+ <li>
+ <a>
+ ...
+ </a>
+ </li>
{% endif %}
{% if object_list.has_next %}
<li>
