Suppose I have a Book model with a language field and a foreign key to a Publisher model.
Currently I use a Count annotation in a custom Publisher manager to allow me to add to the admin a sortable column with the number of books by each publisher. (see http://stackoverflow.com/questions/3491766/how-to-add-a-sortable-count-column-to-the-django-admin-of-a-model-with-a-many-to )
My problem now is that I need to have a different column count for the books published in each language.
Is there any way to make the annotation subject to a filter of the related model?