...

Text file src/github.com/noirbizarre/gonja/testData/filters/sum.tpl

Documentation: github.com/noirbizarre/gonja/testData/filters

     1{{ [1, 2, 3, 4, 5, 6]|sum }}
     2{{ [1, 2, 3, 4, 5, 6]|sum(start=10) }}
     3{{ [1, 2, 3, 4, 5, 6.1]|sum }}
     4{{ [{'value': 23}, {'value': 1}, {'value': 18}]|sum('value') }}
     5{{ [{'real': {'value': 23}}, {'real': {'value': 1}}, {'real': {'value': 18}}]|sum('real.value') }}
     6{{ [('foo', 23), ('bar', 1), ('baz', 18)]|sum(1) }}

View as plain text