-
-
Save JorgeMichelena/b170dbbef472d78e349992d976eac9a3 to your computer and use it in GitHub Desktop.
This file contains 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
most_used_topic = ( | |
Target.objects | |
.values("topic") | |
.annotate(topic_count=Count("topic")) | |
.order_by("-topic_count") | |
.first() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment