I need Ajax pagination using jQuery in a Django template.
I have the following code in my template:
I did not find the error, but I show you below how I solved this task. I think you can adapt it easily to your needs.
The jquery ajax part:
The template html part:
{% if object_list.has_previous %} previous {% else %} previous {% endif %} Page {{ object_list.number }} of {{ object_list.paginator.num_pages }}. {% if object_list.has_next %} next {% else %} next {% endif %} {% table_header headers %} .... 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题