On Dec 21, 4:40 pm, yummy_droid <yus...@gmail.com> wrote:
> Anyone have advice on this?

Not really. Your solution is probably the best that can be done - it
does involve instantiating the ChangeList twice, but that's pretty
much unavoidable. One of the main criticisms a lot of people have of
the (otherwise wonderful) admin application is that a lot of the
methods are pretty monolithic - there aren't many hooks that you can
use to override small bits without having to repeat the whole method.

That said, here's an option that just occurred to me. The template has
access to the changelist object, which you use to get the query set to
calculate the aggregate. So you can use that `cl` via the template by
writing a template tag that takes that as a parameter, gets the
queryset and adds the aggregate value.
--
DR.

--

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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to