예제 #1
0
def index():
    posts = Post.query(Post.is_public == True).order(-Post.created)
    return render_template(
        'blog/index.html',
        title=u'Новости',
        posts=posts
    )
예제 #2
0
파일: views.py 프로젝트: minimedj/3dhero.ru
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
예제 #3
0
파일: views.py 프로젝트: gmist/3dhero.ru
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
예제 #4
0
파일: views.py 프로젝트: minimedj/3dhero.ru
def index():
    posts = Post.query().order(-Post.created)
    return render_template(
        'blog/admin/posts.html',
        posts=posts
    )
예제 #5
0
파일: views.py 프로젝트: gmist/3dhero.ru
def index():
    posts = Post.query(Post.is_public == True).order(-Post.created)
    return render_template("blog/index.html", title=u"Новости", posts=posts)