forked from rDrama/rDrama
cvx
parent
a1969aa1ea
commit
374b2fc313
|
@ -323,7 +323,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
||||||
elif sort == "old":
|
elif sort == "old":
|
||||||
posts = posts.order_by(Submission.created_utc.asc())
|
posts = posts.order_by(Submission.created_utc.asc())
|
||||||
elif sort == "controversial":
|
elif sort == "controversial":
|
||||||
posts = posts.order_by((Submission.upvotes+1)/(Submission.downvotes+1) + (Submission.downvotes+1)/(Submission.upvotes+1))
|
posts = posts.order_by((Submission.upvotes+1)/(Submission.downvotes+1) + (Submission.downvotes+1)/(Submission.upvotes+1)).order_by(Submission.downvotes.desc())
|
||||||
elif sort == "top":
|
elif sort == "top":
|
||||||
posts = posts.order_by(Submission.downvotes - Submission.upvotes)
|
posts = posts.order_by(Submission.downvotes - Submission.upvotes)
|
||||||
elif sort == "bottom":
|
elif sort == "bottom":
|
||||||
|
|
Loading…
Reference in New Issue