コード例 #1
0
ファイル: search.py プロジェクト: xuxmin/Book_Manage_System
def index():
    u = current_user()
    log("当前用户:", u)
    if u is None:
        abort(403)
    else:
        books = Book.find_all()
        return render_template('search.html', books=books, card_id=u.card_id)
コード例 #2
0
ファイル: index.py プロジェクト: xuxmin/Book_Manage_System
def index():
    u = current_user()
    log("当前用户:", u)
    books = Book.find_all()
    if u is None:
        card_id = "None"
    else:
        card_id = u.card_id
    return render_template('index.html', user=u, books=books, card_id=card_id)