{% load pagination %} {% if page.has_other_pages %}
    {% if page.has_previous %}
  1. {% endif %} {% nice_page_set page as page_set %} {% for page_num in page_set %}
  2. {% if page_num == -1 %} ... {% else %} {{ page_num }} {% endif %}
  3. {% endfor %} {% if page.has_next %}
  4. {% endif %}
{% endif %}