fds
parent
ad8a0ffef0
commit
de6f5ae49d
|
@ -215,10 +215,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
elif sort == "bottom":
|
elif sort == "bottom":
|
||||||
posts = posts.order_by(Submission.upvotes - Submission.downvotes)
|
posts = posts.order_by(Submission.upvotes - Submission.downvotes)
|
||||||
elif sort == "comments":
|
elif sort == "comments":
|
||||||
print("WTF")
|
|
||||||
print(posts.all())
|
|
||||||
posts = posts.order_by(Submission.comment_count.desc())
|
posts = posts.order_by(Submission.comment_count.desc())
|
||||||
print(posts.all())
|
|
||||||
|
|
||||||
posts = posts.offset(25 * (page - 1)).limit(26).all()
|
posts = posts.offset(25 * (page - 1)).limit(26).all()
|
||||||
|
|
||||||
|
@ -230,6 +227,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
||||||
|
|
||||||
if ids_only: posts = [x.id for x in posts]
|
if ids_only: posts = [x.id for x in posts]
|
||||||
|
|
||||||
|
print(posts)
|
||||||
return posts, next_exists
|
return posts, next_exists
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue