Blog
{% endblock %}-
{% for article in articles_page.object_list %}
-
{% if articles_page.has_previous() and (articles_page.previous_page_number() != 1) %}
- 1 {% endif %} {% if articles_page.previous_page_number() - 1 == 2 %}
- {{ articles_page.previous_page_number() - 1}} {% elif articles_page.previous_page_number() - 1 > 1 %}
- ... {% endif %} {% if articles_page.has_previous() %}
- {{ articles_page.previous_page_number() }} {% endif %}
- {{ articles_page.number }} {% if articles_page.has_next() %}
- {{ articles_page.next_page_number() }} {% endif %} {% if articles_paginator.num_pages - articles_page.next_page_number() == 2 %}
- {{ articles_page.next_page_number() + 1}} {% elif articles_paginator.num_pages - articles_page.next_page_number() > 2 %}
- ... {% endif %} {% if articles_page.has_next() and (articles_page.next_page_number() != articles_paginator.num_pages) %}
- {{ articles_paginator.num_pages }} {% endif %}