Esempio n. 1
0
File: bbs.py Progetto: kzkn/fc
def index(page=1):
    modelpage = max(0, page - 1)
    posts = bbs.find_posts_on_page(modelpage)
    pages = bbs.count_pages()
    if page > pages:
        abort(404)
    begin, end = pagination(page, pages)
    return render_template('bbs.html', page=page, pages=pages, posts=posts,
            begin=begin, end=end)
Esempio n. 2
0
File: mobile.py Progetto: kzkn/fc
def bbs(page=1):
    user = users.find_by_id(get_userid())
    if not user:
        abort(401)
    modelpage = max(0, page - 1)
    posts = bbsmodel.find_posts_on_page(modelpage)
    pages = bbsmodel.count_pages()
    begin, end = pagination(page, pages)
    return render_template("mobile/bbs.html", user=user, page=page, pages=pages, posts=posts, begin=begin, end=end)
Esempio n. 3
0
def report_list(page=1):
    modelpage = max(0, page - 1)
    rs = reports.find_reports_on_page(modelpage)
    pages = reports.count_pages()
    if page > pages:
        abort(404)
    begin, end = pagination(page, pages)
    recent_reports = reports.recent()
    return render_template('reports.html', page=page, pages=pages,
            reports=rs, begin=begin, end=end,
            recent_reports=recent_reports)