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

        {% if pages.has_previous %}
            <a href="?{{qry_data}}&page={{ pages.previous_page_number }}"><< Previous</a>
        {% else %}
            << 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 >></a>
        {% else %}
            Next >>
        {% endif %}

        {% ifnotequal pages.number pages.paginator.num_pages %}
            <a href="?{{qry_data}}&page={{ pages.paginator.num_pages }}">Last ></a>
        {% else %}
            Last >
        {% endifnotequal %}
    </span>
</div>