简体   繁体   English

使用Django分页后未显示数据表

[英]Datatable is not showing after using django pagination

I am having problem with pagination in django. 我在Django的分页时遇到问题。 After using pagination,not even able to show table in the template.Please find below views.py and template.I mark the problem area. 使用分页后,甚至无法在模板中显示表格。请在下面的views.py和template中找到。我标记了问题区域。 Any help will be much appreciated. 任何帮助都感激不尽。

paginator=Paginator('test',10)# show 10 results per page

here you pass a 'test' string to Paginator, instead pass test object so it will be 在这里,您将一个'test'字符串传递给Paginator,而不是传递测试对象,因此它将

paginator=Paginator(test,10)# show 10 results per page

hope it will work 希望它能工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM