def detail(blog_id): blog_comment_form = BlogCommentForm(user_id=current_user.id, blog_id=blog_id) reply_comment_form = ReplyCommentForm() blog = Blog.query.get(blog_id) comments = Comment.query.filter_by(blog_id=blog_id).all() Blog.add_views(blog_id) return render_template('/blog/detail.html', blog=blog, comments=comments, form=blog_comment_form, reply_form=reply_comment_form)