appearance tweaks

This commit is contained in:
2024-08-08 15:14:44 +00:00
parent 1c6293fda3
commit 92b314623a
16 changed files with 67 additions and 57 deletions

View File

@@ -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