jiangyanglinlan
Results
1
issues of
jiangyanglinlan
1. 主页每篇文章显示的评论数是这篇文章下的所有评论(包括未审核通过的), 主要代码如下: ```python {{ post.comments|length }} ``` 2. 文章详情页面显示的评论数是分页后当前页面的评论数, 而不是文章的总评论数, 主要的代码如下: ```python post = Post.query.get_or_404(post_id) page = request.args.get('page', 1, type=int) per_page = current_app.config['BLUELOG_COMMENT_PER_PAGE'] pagination = Comment.query.with_parent(post).filter_by(reviewed=True).order_by(Comment.timestamp.asc()).paginate(page, per_page) comments =...
improvement