def article_detail(post_id): post = Post.get_post(post_id) if not post or not post.post_id or post.status != "published": abort(404) author = User(user_id=post.author_id) comment_form = CommentForm() return render_template("article.html", post=post, author=author, comment_form=comment_form)
def article_detail(post_id): post = Post.get_post(post_id) if not post or not post.post_id or post.status != 'published': abort(404) author = User(user_id=post.author_id) comment_form = CommentForm() return render_template('article.html', post=post, author=author, comment_form=comment_form)
def edit_post(post_id): post = Post.get_post(post_id) return render_template('dashboard/dash_post_edit.html', post=post)