{% if page_obj.has_previous %}
  • ⇐туда
  • {% endif %}   {% if page_obj.has_next %}
  • сюда⇒
  • {% endif %}