[Answered ]-Django pagination has_previous and has_next methods doesn't work

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 %}

Leave a comment