{% if paginator.count %}
    <div class="previous_next_wrapper">
        <div class="previous">
            {% if page.has_previous %}
                <a href="?page={{ page.previous_page_number }}">&larr; Previous</a>
            {% else %}
                <span>&larr; Previous</span>
            {% endif %}
        </div>
        
        <div class="next">
            {% if page.has_next %}
                <a href="?page={{ page.next_page_number }}">Next &rarr;</a>
            {% else %}
                <span>Next &rarr;</span>
            {% endif %}
        </div>
    </div>
{% endif %}