Ah. That looks simple. Thanks!
On Dec 21, 2:01 pm, Javier Guerra Giraldez wrote:
> 2.1) use the sum() aggregation with the queryset,
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegr
Thanks Venkat,
I do like that book -- in fact, it was that book which pointed me to
this google group.
I considered all 4 of those options. Wasn't sure if any of them were
contrary to the philosophy of Django. I wonder if I'm paranoid of an
imaginary code review!
Mike
--
You received this m
2.1) use the sum() aggregation with the queryset, making the DB do the
work. pass to the template in an extra variable
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.co
http://www.djangobook.com/ Helps in most of the cases.
There are couple of solutions:
1) define a custom tag : pass the list as an argument to this function which
computes the sum
2) when you are passing the list of items from your view to the template,
why not calculate the same in the view itsel
I am an experienced developer but new to web development, Python, and
Django. Point me to a good book if you think this is too basic for
this group.
I coded a template that lists a bunch of items. Each item has a
price. In the template, I want to include the sum of all the prices
on a TOTAL
5 matches
Mail list logo