In this case, the fancy version will actually work whereas the non-generic one will fail with an InvalidCastException. The reason behind this is simple - the API method used to fetch the value from the registry returns a boxed integer. A boxed integer can on...
Aggregationsupport 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 thedocsaggregation is not supported for generic relations. This entry describes how to work around this using the.extra()method. The state...