Skip to content

Instantly share code, notes, and snippets.

@akshar-raaj
Created August 12, 2019 09:06
Show Gist options
  • Save akshar-raaj/c31bd0fd83235024445404afd5855cd7 to your computer and use it in GitHub Desktop.
Save akshar-raaj/c31bd0fd83235024445404afd5855cd7 to your computer and use it in GitHub Desktop.
Question.objects.annotate(avg_votes=Avg('choice__votes'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment