Пример #1
0
def update_member(u):
    members = Member.all()
    for m in members:
        if u.score >= m.start_score:
            u.member_id = m.id
        else:
            return
Пример #2
0
def details():
    user = current_user()
    members = Member.all()
    # 传递 topic 的所有 reply 到 页面中
    return render_template("user/details.html", user=user, members=members)
Пример #3
0
    11. Return book

    Type `exit` to exit the program
"""

while True:

    print(message)
    option = input('Please enter your choice: ').lower()

    if option == '1':
        print('=' * 80)
        print(f"Sr.No. Member ID Name{' '*36}")
        print('=' * 80)
        for index, member in enumerate(Member.all(), start=1):
            print(
                f'{str(index).ljust(7)}{str(member.record_id).ljust(10)}{member.name.ljust(30)}'
            )

    elif option == '2':
        member_id = input('Member id: ')
        member = Member.find(member_id)
        if not member:
            print("Record not found")
        else:
            print('=' * 80)
            print(f'Name:\t{member.name}')
            print('=' * 80)
            books = member.books()
            if not books: