>     shows = TVSeries.objects.all().order_by('name').annotate(
>             num_episodes=Count('tvepisode'),
>             num_episodes_with_media=Count('tvepisode__media_id'),
>             num_aired_episodes=Count('tvepisode__airdate'),
>             num_seasons=Max('tvepisode__season'))

Woah. Is that new?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFO84S6NH9io8J1sJAKX0PHTHmD%3DZ0TTGJk7snRuUkxuw-VZpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to