How can you include annotated results in a serialized QuerySet?
data = serializer.serialize(Books.objects.filter(publisher__id=id).annotate(num_books=Count('related_books')), use_natural_keys=True)
However the key/value pare {'num_books': number} is not include into the json result.
I've been searching for similar questions on the internet, but i didn't found a solution that worked for me.
Here is a similar case: http://python.6.x6.nabble.com/How-can-you-include-annotated-results-in-a-serialized-QuerySet-td67238.html
Thanks!