Re: sorting model data in template page

2011-04-29 Thread Victor Harada
The for tag does not accept calls with parameter. You should make the view function calculate the sorted list and pass it to the template or create a template tag that accepts your call 2011/4/29 Krish > This code works perfectly, > > {% for talk_child in talk.child.all %} > {{talk_child.text}}

Re: Sum in html template using template tag

2011-03-11 Thread Victor Harada
Hi You should use {{ list | running_total }} and the filter should look like this: from django.template import Library register = Library() @register.filter def running_total(role_total): return sum( [d.get('total') for d in role_total] ) 2011/3/11 sushanth Reddy > Hi , > > I am trying t