django-admin: Add extra row with totals

后端 未结 7 1875
盖世英雄少女心
盖世英雄少女心 2020-12-12 20:50

I\'m using the standard django admin module to display a list of rows. One of the columns is a numerical field. I\'d like to display an extra \'totals\' row that has most of

7条回答
  •  醉酒成梦
    2020-12-12 21:22

    if you create a custom view overiding the admin view you should be able to take the queryset along with the current page information and slice the data to create a total appropriate to the current page. if you want a true total than I still see a custom overridden admin view as the option you are looking for.

提交回复
热议问题