forked from rDrama/rDrama
fdfd
parent
e494965f94
commit
ac403b03ba
|
@ -14,6 +14,8 @@ def slash_post():
|
||||||
@auth_required
|
@auth_required
|
||||||
def notifications(v):
|
def notifications(v):
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
|
||||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||||
|
|
||||||
page = int(request.args.get('page', 1))
|
page = int(request.args.get('page', 1))
|
||||||
|
@ -60,6 +62,9 @@ def notifications(v):
|
||||||
if c not in listing:
|
if c not in listing:
|
||||||
listing.append(c)
|
listing.append(c)
|
||||||
|
|
||||||
|
print(type(time.time()))
|
||||||
|
print(time.time() - start)
|
||||||
|
|
||||||
return render_template("notifications.html",
|
return render_template("notifications.html",
|
||||||
v=v,
|
v=v,
|
||||||
notifications=listing,
|
notifications=listing,
|
||||||
|
@ -181,8 +186,6 @@ def frontlist(v=None, sort="hot", page=1,t="all", ids_only=True, filter_words=''
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def front_all(v):
|
def front_all(v):
|
||||||
|
|
||||||
start = time.time()
|
|
||||||
|
|
||||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||||
|
|
||||||
try: page = int(request.args.get("page") or 1)
|
try: page = int(request.args.get("page") or 1)
|
||||||
|
@ -217,9 +220,6 @@ def front_all(v):
|
||||||
# check if ids exist
|
# check if ids exist
|
||||||
posts = get_posts(ids, v=v)
|
posts = get_posts(ids, v=v)
|
||||||
|
|
||||||
print(type(time.time()))
|
|
||||||
print(time.time() - start)
|
|
||||||
|
|
||||||
if request.path == "/": return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
if request.path == "/": return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
||||||
else: return jsonify({"data": [x.json for x in posts], "next_exists": next_exists})
|
else: return jsonify({"data": [x.json for x in posts], "next_exists": next_exists})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue