def user_homepage_paged(user_id, page): author = User.get_user_by_id(user_id) if not author: abort(404) pagenation = User.get_user_posts_pagenation(user_id, page=page) posts = pagenation.items if pagenation else [] return render_template("author.html", author=author, posts=posts, pagenation=pagenation)
def user_homepage(user_id): author = User.get_user_by_id(user_id) if not author: abort(404) pagenation = User.get_user_posts_pagenation(user_id) posts = pagenation.items if pagenation else [] return render_template( 'author.html', author=author, posts=posts, pagenation=pagenation) # TODO /考虑使用用户名或昵称替代用户 id 作为链接标识
def user_homepage(user_id): author = User.get_user_by_id(user_id) if not author: abort(404) pagenation = User.get_user_posts_pagenation(user_id) posts = pagenation.items if pagenation else [] return render_template( "author.html", author=author, posts=posts, pagenation=pagenation ) # TODO /考虑使用用户名或昵称替代用户 id 作为链接标识
def user_homepage_paged(user_id, page): author = User.get_user_by_id(user_id) if not author: abort(404) pagenation = User.get_user_posts_pagenation(user_id, page=page) posts = pagenation.items if pagenation else [] return render_template('author.html', author=author, posts=posts, pagenation=pagenation)