forked from rDrama/rDrama
Merge branch 'master' into db-seed
commit
ed05272a22
|
@ -231,7 +231,7 @@ def post_base36id(pid, anything=None, v=None):
|
|||
post.views += 1
|
||||
g.db.add(post)
|
||||
g.db.commit()
|
||||
|
||||
if isinstance(session.get('over_18', 0), dict): session["over_18"] = 0
|
||||
if post.over_18 and not (v and v.over_18) and not session.get('over_18', 0) >= int(time.time()):
|
||||
return {"html":lambda:render_template("errors/nsfw.html",
|
||||
v=v,
|
||||
|
|
|
@ -44,7 +44,7 @@ def leaderboard(v):
|
|||
if v and v.is_banned and not v.unban_utc:return render_template("seized.html")
|
||||
users = g.db.query(User).options(lazyload('*'))
|
||||
users1= sorted(users, key=lambda x: x.dramacoins, reverse=True)[:25]
|
||||
users2= list(users.order_by(User.stored_subscriber_count).limit(10).all())
|
||||
users2= list(users.order_by(User.stored_subscriber_count.desc()).limit(10).all())
|
||||
return render_template("leaderboard.html", v=v, users1=users1, users2=users2)
|
||||
|
||||
@app.get("/@<username>/css")
|
||||
|
|
Loading…
Reference in New Issue