{% load i18n %} {% if page_obj.paginator.count > 0 %}
{% trans "Showing" %} {{ page_obj.start_index }}-{{ page_obj.end_index }} {% trans "of" %} {{ page_obj.paginator.count }}
{% for key, value in request.GET.items %} {% if key != 'page_size' and key != 'page' %} {% endif %} {% endfor %}
{% if page_obj.has_previous %} {% else %} {% endif %} {% for num in page_obj.paginator.page_range %} {% if num == page_obj.number %} {{ num }} {% elif num > page_obj.number|add:'-3' and num < page_obj.number|add:'3' %} {{ num }} {% elif num == 1 or num == page_obj.paginator.num_pages %} {{ num }} {% elif num == page_obj.number|add:'-3' or num == page_obj.number|add:'3' %} ... {% endif %} {% endfor %} {% if page_obj.has_next %} {% else %} {% endif %}
{% endif %}