【问题标题】:Datatable is not showing after using django pagination使用 django 分页后数据表未显示
【发布时间】:2018-05-22 17:22:25
【问题描述】:

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

【问题讨论】:

    标签: python django templates pagination


    【解决方案1】:
    paginator=Paginator('test',10)# show 10 results per page
    

    在这里你将一个“测试”字符串传递给 Paginator,而不是传递测试对象,所以它将是

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

    希望它会起作用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-11
      • 1970-01-01
      • 1970-01-01
      • 2021-02-17
      • 1970-01-01
      相关资源
      最近更新 更多