class Aggregate(expression, output_field=None, **extra) [source]
template
A class attribute, as a format string, that describes the SQL that is generated for this aggregate. Defaults to '%(function)s( %(expressions)s )'.
function
A class attribute describing the aggregate function that will be generated. Specifically, the function will be interpolated as the function placeholder within template. Defaults to None.
The expression argument can be the name of a field on the model, or