Created
April 24, 2015 14:39
-
-
Save Visgean/9eb4b595eeb1ac808a7e to your computer and use it in GitHub Desktop.
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
| >>> voting_round_instance = models.VotingRound.objects.first() | |
| >>> voting_round_instance.vote_set.values('vote').annotate(count=Count('vote')).distinct() | |
| [{'vote': u'decline', 'count': 1}, {'vote': u'neutral', 'count': 1}, {'vote': u'decline', 'count': 1}, {'vote': u'approve', 'count': 1}, {'vote': u'approve', 'count': 1}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment