Re: Sum in html template using template tag

2011-03-12 Thread sushanth Reddy
it worked,thanks aaa ton -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more optio

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