fd
This commit is contained in:
parent
78199ea4ee
commit
401290173e
1 changed files with 2 additions and 2 deletions
|
@ -128,11 +128,11 @@ def frontlist(v=None, sort="hot", page=1,t="all", ids_only=True, filter_words=''
|
||||||
elif sort == "top":
|
elif sort == "top":
|
||||||
time1 = time.time()
|
time1 = time.time()
|
||||||
posts = sorted(posts.all(), key=lambda x: x.score, reverse=True)
|
posts = sorted(posts.all(), key=lambda x: x.score, reverse=True)
|
||||||
print("list " + time.time() - time1)
|
print("list " + str(time.time() - time1))
|
||||||
elif sort == "bottom":
|
elif sort == "bottom":
|
||||||
time1 = time.time()
|
time1 = time.time()
|
||||||
posts = posts.order_by(Submission.sexscore.desc()).all()
|
posts = posts.order_by(Submission.sexscore.desc()).all()
|
||||||
print("func " + time.time() - time1)
|
print("func " + str(time.time() - time1))
|
||||||
elif sort == "comments":
|
elif sort == "comments":
|
||||||
posts = posts.order_by(Submission.comment_count.desc()).all()
|
posts = posts.order_by(Submission.comment_count.desc()).all()
|
||||||
elif sort == "random":
|
elif sort == "random":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue