{% load i18n %} {% if is_paginated %} {% if page_obj.has_previous %} {% trans "Previous" %} {% endif %} {% for num in page_obj.paginator.page_range %} {% if num %} {% if page_obj.number == num %} {{ num }} {% else %} {{ num }} {% endif %} {% else %} ... {% endif %} {% endfor %} {% if page_obj.has_next %} {% trans "Next" %} {% endif %} {% endif %}