I reported the sample code on the Internet to page on Django
The contents of the first page come out well, but if you press Next, nothing comes out.
In url?I think it's getting weird with page=2, but I don't know what to do.
django pagination python
Paginator must be used instead of res
Posts for res and paginator for paginator
The output related to the text is res and you must use a paginator for paging
{% if paginator.has_next %}
<li><a href="?page={{ paginator.next_page_number }}">Next</a></li>
{% {% endif %}
For more information on pagination, see
https://docs.djangoproject.com/es/1.10/topics/pagination/
© 2024 OneMinuteCode. All rights reserved.