appearance tweaks
This commit is contained in:
@@ -44,7 +44,8 @@ def index():
|
||||
def explore():
|
||||
query = sa.select(Post).order_by(Post.timestamp.desc())
|
||||
page = request.args.get('page', 1, type=int)
|
||||
posts = db.paginate(query, page=page, per_page=app.config['POSTS_PER_PAGE'], error_out=False)
|
||||
ppp = app.config['POSTS_PER_PAGE'] * 2
|
||||
posts = db.paginate(query, page=page, per_page=ppp, error_out=False)
|
||||
next_url = url_for('explore', page=posts.next_num) if posts.has_next else None
|
||||
prev_url = url_for('explore', page=posts.prev_num) if posts.has_prev else None
|
||||
|
||||
|
Reference in New Issue
Block a user