forked from rDrama/rDrama
add pagination to reported posts
parent
6ecfc32317
commit
f3ec963708
|
@ -329,20 +329,12 @@ def reported_posts(v):
|
||||||
is_approved=None,
|
is_approved=None,
|
||||||
is_banned=False,
|
is_banned=False,
|
||||||
deleted_utc=0
|
deleted_utc=0
|
||||||
).join(Submission.flags).order_by(Submission.id.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE+1)
|
).join(Submission.flags)
|
||||||
|
|
||||||
t = time.time()
|
|
||||||
next_exists = listing.count()
|
next_exists = listing.count()
|
||||||
print(t - time.time())
|
|
||||||
|
|
||||||
|
listing = listing.order_by(Submission.id.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE)
|
||||||
listing = [p.id for p in listing]
|
listing = [p.id for p in listing]
|
||||||
|
|
||||||
t = time.time()
|
|
||||||
next_exists = len(listing)
|
|
||||||
print(t - time.time())
|
|
||||||
|
|
||||||
return "wtf"
|
|
||||||
|
|
||||||
listing = get_posts(listing, v=v)
|
listing = get_posts(listing, v=v)
|
||||||
|
|
||||||
return render_template("admin/reported_posts.html",
|
return render_template("admin/reported_posts.html",
|
||||||
|
|
Loading…
Reference in New Issue