fsd
This commit is contained in:
parent
6f0741d565
commit
c3188d8fc4
1 changed files with 2 additions and 1 deletions
|
@ -171,7 +171,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
posts = posts.join(Submission.author).filter(User.shadowbanned == False)
|
||||
|
||||
if sort == "hot":
|
||||
posts = posts.order_by(-1*(Submission.upvotes - Submission.downvotes)/((Submission.created_utc)/1000))
|
||||
ti = int(time.time())
|
||||
posts = posts.order_by(-1*(Submission.upvotes - Submission.downvotes)/((ti - Submission.created_utc)/1000))
|
||||
elif sort == "new":
|
||||
posts = posts.order_by(Submission.created_utc.desc())
|
||||
elif sort == "old":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue