<div style="text-align: center">
    <span class="step-links">
        {% if pages.number > 1 %}
            <a href="?{{qry_data}}&page=1">&lt; First</a>
        {% else %}
            &lt; First
        {% endif %}

        {% if pages.has_previous %}
            <a href="?{{qry_data}}&page={{ pages.previous_page_number }}">&lt;&lt; Previous</a>
        {% else %}
            &lt;&lt; Previous
        {% endif %}

        <span class="current">
            Page {{ pages.number }} of {{ pages.paginator.num_pages }}.
        </span>

        {% if pages.has_next %}
            <a href="?{{qry_data}}&page={{ pages.next_page_number }}">Next &gt;&gt;</a>
        {% else %}
            Next &gt;&gt;
        {% endif %}

        {% if pages.number != pages.paginator.num_pages %}
            <a href="?{{qry_data}}&page={{ pages.paginator.num_pages }}">Last &gt;</a>
        {% else %}
            Last &gt;
        {% endif %}
    </span>
</div>
