I'm using the standard django admin module to display a list of rows. One of the columns is a numerical field. I'd like to display an extra 'totals' row that has most of the columns as blank, except for the numerical column, which should be the total for all of the objects.
Is there a simple way to do this within the admin module, or am I better off making a custom view for it?
I'm using Django 1.2.
AFAIK there's no way to do this without creating a custom view. The concept is a little flawed anyway, because a user would expect such a row to show the total for only the visible objects, rather than all the objects in the queryset. Thus, any pagination would result in confusion.
As an aside, you can add extra columns to an admin list view by doing something like the following: