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)
def index(): posts = Post.query().order(-Post.created_at) return render_template("posts/index.html", posts=posts)
def find_by_url(url): post = Post.query(Post.url == url, Post.post_status != 'draft').get() return render_template("site/post.html", post=post)