fd
This commit is contained in:
parent
93579df943
commit
5aea470410
2 changed files with 4 additions and 5 deletions
|
@ -77,7 +77,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
|||
primaryjoin="Submission.is_approved==User.id")
|
||||
|
||||
awards = relationship("AwardRelationship", lazy="joined")
|
||||
# scoresex = deferred(Column(Float, server_default=FetchedValue()))
|
||||
scoresex = deferred(Column(Float, server_default=FetchedValue()))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
|
|
|
@ -130,10 +130,9 @@ def frontlist(v=None, sort="hot", page=1,t="all", ids_only=True, filter_words=''
|
|||
posts = sorted(posts.all(), key=lambda x: x.score, reverse=True)
|
||||
print(time.time() - time1)
|
||||
elif sort == "bottom":
|
||||
posts = sorted(posts.all(), key=lambda x: x.score)
|
||||
# time1 = time.time()
|
||||
# posts = posts.order_by(Submission.sexscore.desc()).all()
|
||||
# print(time.time() - time1)
|
||||
time1 = time.time()
|
||||
posts = posts.order_by(Submission.sexscore.desc()).all()
|
||||
print(time.time() - time1)
|
||||
elif sort == "comments":
|
||||
posts = posts.order_by(Submission.comment_count.desc()).all()
|
||||
elif sort == "random":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue