Django aggregation in templates?

后端 未结 2 1878
你的背包
你的背包 2021-01-26 01:05

I\'m thinking a bit about the concept of Django aggregates. I don\'t quite \"get\" how they can be used in my case. Basically i have a three-tier hierarchy of objects in my mode

2条回答
  •  -上瘾入骨i
    2021-01-26 01:27

    The templates do not let you call functions that take arguments. See here for what they let you do.

    The canonical way to deal with this would be to either add some helper methods/managers to your models or to create a custom template tag or filter.

提交回复
热议问题