def index(): posts = Post.query(Post.is_public == True).order(-Post.created) return render_template( 'blog/index.html', title=u'Новости', posts=posts )
def get_latest_posts(): posts_objs = Post.query(Post.is_public == True).order(-Post.created) posts_count = posts_objs.count() posts_objs = posts_objs.fetch(4) return posts_objs, posts_count
def index(): posts = Post.query().order(-Post.created) return render_template( 'blog/admin/posts.html', posts=posts )
def index(): posts = Post.query(Post.is_public == True).order(-Post.created) return render_template("blog/index.html", title=u"Новости", posts=posts)