Exemplo n.º 1
0
def index(page=1):
    #blogss = session.query(Blogs)
    pagination = Blogs.query.order_by(db.desc(Blogs.create_date)).paginate(page, current_app.config['POSTS_PER_PAGE'], False)
    blogss = pagination.items
    articletypecount = ""
    if g.user is not None:
        articletypecount = ArticleType.getlistbyArcount()
    return render_template('blogs/list.html',blogss=blogss,pagination=pagination,articletypecount = articletypecount)
Exemplo n.º 2
0
def index(page=1):
    pagination = Merchant.query.order_by(db.desc(Merchant.create_date)).paginate(page, current_app.config['POSTS_PER_PAGE'], False)
    return render_template('merchant/index.html',pagination=pagination)