Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
def edit_post(post_id):
    post = Post.get_post(post_id)
    return render_template('dashboard/dash_post_edit.html', post=post)