예제 #1
0
파일: views.py 프로젝트: thundernet8/Plog
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)
예제 #2
0
파일: views.py 프로젝트: cash2one/Plog
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)
예제 #3
0
def edit_post(post_id):
    post = Post.get_post(post_id)
    return render_template('dashboard/dash_post_edit.html', post=post)