使用django分页后,数据表未显示

时间:2017-12-08 12:48:57

标签: python django templates pagination

我在django中遇到分页问题。使用分页后,甚至无法在模板中显示表。请在下面查看views.py和template.I标记问题区域。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:1)

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

这里你将'test'字符串传递给Paginator,而不是传递测试对象,所以它将是

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

希望它能运作

相关问题