{% load bee_django_exam_filter %}
{#分页#}
<nav style="text-align: center">
    <ul class="pagination">
        {% for page in page_obj.paginator.page_range %}

            {% if page_obj.paginator.num_pages >= 10 %}
                {% if forloop.counter <= 3 or forloop.counter|add:"3" > page_obj.paginator.num_pages or page_obj.number|get_difference_abs:page <= 2 %}
                    <li {% if page_obj.number == page %} class="active" {% endif %}
                                                         onclick="clickListPage({{ page }})">
                        <a>{{ page }}</a></li>
                {% endif %}
            {% else %}
                <li {% if page_obj.number == page %} class="active" {% endif %} onclick="clickListPage({{ page }})">
                    <a>{{ page }}</a>
                </li>
            {% endif %}
        {% endfor %}

    </ul>
</nav>
{#分页完#}