1👍
✅
You should work with the page_obj
object, so:
{% if page_obj.has_next %} <p>HAS NEXT</p> {% endif %} {% if page_obj.has_previous %} <p>HAS PREVİOUS</p> {% endif %}
Source:stackexchange.com