Ejemplo n.º 1
0
def find_by_tag_name(tag):
    posts = Post.query(Post.tags == Tag(name=tag),
                       Post.post_status != 'draft').fetch()
    return render_template("site/post_list.html", posts=posts)
Ejemplo n.º 2
0
def index():
    posts = Post.query().order(-Post.created_at)
    return render_template("posts/index.html", posts=posts)
Ejemplo n.º 3
0
def find_by_url(url):
    post = Post.query(Post.url == url, Post.post_status != 'draft').get()

    return render_template("site/post.html", post=post)