RE: ordering queries based on most upvotes

2017-06-14 Thread Matthew Pava
x27;) From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Arian Hedayati Far Sent: Wednesday, June 14, 2017 6:51 AM To: Django users Subject: ordering queries based on most upvotes I want to order my query based on the number of upvotes but I can't figure ou

ordering queries based on most upvotes

2017-06-14 Thread Arian Hedayati Far
I want to order my query based on the number of upvotes but I can't figure out how to do it. It seems way too complex! ( btw am I over-complicating things?) so here is my *models.py* class Activity(models.Model): FAVORITE = 'F' LIKE = 'L' UP_VOTE = 'U' DOWN_VOTE = 'D' FOLLOW = 'W' REPORT =