We Vote's API application server written in Django/Python. Election data pulled from many sources, used by https://github.com/wevote/WebApp and https://github.com/wevote/WeVoteCordova and https://github.com/wevote/Campaigns.
We already show "Voters With Friends: 8" on the Admin home page. We want to be able to show "Voters with X+ Friends".
In the file "/WeVoteServer/friend/models.py" in the function "fetch_voters_with_friends_count" we already figure out how many voters have 1 or more friendships. We need to figure out how to count number of voter_we_vote_ids in either column, so we can limit the count of the number of friendships to those voter_we_vote_ids which appear "this_many_friends_or_more" times or more. Started Google searching with "django python count distinct".
We already show "Voters With Friends: 8" on the Admin home page. We want to be able to show "Voters with X+ Friends". In the file "/WeVoteServer/friend/models.py" in the function "fetch_voters_with_friends_count" we already figure out how many voters have 1 or more friendships. We need to figure out how to count number of voter_we_vote_ids in either column, so we can limit the count of the number of friendships to those voter_we_vote_ids which appear "this_many_friends_or_more" times or more. Started Google searching with "django python count distinct".