Created
April 16, 2014 14:47
-
-
Save bikeath1337/10887747 to your computer and use it in GitHub Desktop.
Tutor count Per Organization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dbor_schemas.models import NoodleTutoringOrganization | |
| from django.db.models import Count | |
| to = NoodleTutoringOrganization.objects.annotate(Count('primary_profile')) | |
| for tutor_org in to: | |
| print tutor_org.name, "tutors", tutor_org.primary_profile__count | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!