Example #1
0
def create_teacher():
    print("=========创建老师========")
    print("学校列表")
    school_list = School.get_all_school_list()
    for k, obj in enumerate(school_list, 1):
        print(k, obj)
    sid = int(input("请选择学校选项:"))
    school_obj = school_list[sid - 1]
    name = input("请输入教师姓名")
    teacher_obj = Teacher(name, school_obj.nid)
    teacher_obj.save()
Example #2
0
def show_school():
    print("=========学校========")
    school_list = School.get_all_school_list()
    for item in school_list:
        print(item.schoolName)