{% load i18n %}

{% if is_paginated %}
<ul class="pager">
    {% if page_obj.has_previous %}
        <li class="previous"><a href="?page={{ page_obj.previous_page_number }}"><span aria-hidden="true">&larr;</span> {% trans 'Previous' %}</a></li>
    {% endif %}

    {% if page_obj.has_next %}
        <li class="next"><a href="?page={{ page_obj.next_page_number }}">{% trans 'Next' %}<span aria-hidden="true">&rarr;</span></a></li>
    {% endif %}
</ul>
{% endif %}