Answer the question
In order to leave comments, you need to log in
How to create a button click condition?
There is a paginator like this:
<ul class ='paginate'>
<li>
<a href="#">Previous</a>
</li>
{% for n in page_obj.paginator.page_range %}
{% if n > page_obj.number|add:-3 and n < page_obj.number|add:3 %}
<li><a href="?page={{ n }}">{{ n }}</a></li>
{% endif %}
{% endfor %}
<li><a href="#">Next</a></li>
</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question