Generating aggregate data across generic relations May 22, 2010 19:22 / 7 comments

Aggregation support was added to django's ORM in version 1.1, allowing you to generate Sums, Counts, and more without having to write any SQL. According to the docs aggregation is not supported for generic relations. This entry describes how to work around this using the .extra() method.


Django aggregation and most popular tags August 21, 2009 07:55 / 0 comments

Use Django to calculate most popular tags, or any query that makes use of an aggregation function.