コード例 #1
0
ファイル: user.py プロジェクト: zgwdg/white
def user_page(page=1):
    me = g.user
    if me.is_root():
        page = user_service.page(page, config.posts_per_page())
    else:
        page = user_service.get_user_page(me)

    return render_template('admin/user/index.html', users=page)
コード例 #2
0
ファイル: user.py プロジェクト: lf8289/white
def user_page(page=1):
    me = g.user 
    if me.is_root():
        page = user_service.page(page, config.posts_per_page())
    else:
        page = user_service.get_user_page(me)

    return render_template('admin/user/index.html', users=page)
コード例 #3
0
ファイル: front.py プロジェクト: lf8289/white
def posts(page=1, category=None):
    if page <= 0:
        theme_render('404.html')
    total, posts = post_service.get_published_posts_page(
        page, config.posts_per_page(), category)
    return theme_render('posts.html',
                        page_title='posts',
                        post_total=total,
                        posts=posts,
                        page_offset=page)
コード例 #4
0
def posts(page=1, category=None):
    if page <= 0:
        theme_render('404.html')
    total, posts = post_service.get_published_posts_page(
        page, config.posts_per_page(), category)
    return theme_render('posts.html',
                        page_title='posts',
                        post_total=total,
                        posts=posts,
                        page_offset=page)
コード例 #5
0
ファイル: comment.py プロジェクト: lf8289/white
def comment_page(page=1, status='all'):
    pagination = comment_service.page(status, page, site.posts_per_page())
    return render_template('admin//comment/index.html',
                           statuses=COMMENT_STATUSES,
                           status=status,
                           comments=pagination)
コード例 #6
0
def page_page(page=1, status='all'):
    pagination = page_service.page(status, page, site.posts_per_page())
    return render_template('admin/page/index.html',
                           status=status,
                           pages=pagination)
コード例 #7
0
def comment_page(page=1, status='all'):
    pagination = comment_service.page(status, page, site.posts_per_page())
    return render_template('admin//comment/index.html',
                           statuses=COMMENT_STATUSES,
                           status=status,
                           comments=pagination)
コード例 #8
0
def post_page(page=1, category=None):
    pagination = post_service.page(page, site.posts_per_page(), category)
    return render_template('admin//post/index.html',
                           categories=category_service.dropdown(),
                           posts=pagination,
                           category=category)
コード例 #9
0
ファイル: post.py プロジェクト: lf8289/white
def post_page(page=1, category=None):
    pagination = post_service.page(page, site.posts_per_page(), category)
    return render_template('admin//post/index.html',
                           categories=category_service.dropdown(),
                           posts=pagination,
                           category=category)
コード例 #10
0
ファイル: page.py プロジェクト: lf8289/white
def page_page(page=1, status='all'):
    pagination = page_service.page(status, page, site.posts_per_page())
    return render_template('admin/page/index.html',
                           status=status,
                           pages=pagination)