{% if is_paginated or page_obj.has_other_pages %}
{% if page_obj.has_previous %} Previous {% endif %} {% if page_obj.has_next %} Next {% endif %}
{% endif %}