示例#1
0
def main():
    print('======老师登录======')
    teacher = commons.login(models.Teacher.db_path)

    choices = [{
        'name': '查看班级信息',
        'method': class_info,
        'args': teacher
    }, {
        'name': '查看学生信息',
        'method': student_info,
        'args': teacher
    }, {
        'name': '设置学生分数',
        'method': set_student_score,
        'args': teacher
    }]

    commons.to_choices_args(choices, True)
示例#2
0
 def login():
     return commons.login(Admin.db_path)
示例#3
0
 def login():
     return commons.login(Student.db_path)
示例#4
0
 def login():
     return commons.login(Teacher.db_path)
示例#5
0
# # logger = logging.getLogger('TEST-LOG') # 标记,获取loger对象
# # logger.setLevel(logging.DEBUG) # 设置日志的级别
# #
# # ch = logging.StreamHandler()
# # ch.setLevel(logging.DEBUG)
# #
# # fh = logging.FileHandler("access.log")
# # fh.setLevel(logging.WARNING)
# #
# # formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# # formatter_fh = logging.Formatter('%(asctime)s - %(filename)s -%(lineno)d - %(levelname)s - %(message)s')
# #
# # ch.setFormatter(formatter) # 将format注册给handle
# # fh.setFormatter(formatter_fh)
# # logger.addHandler(ch) # 将handle注册给logger
# # logger.addHandler(fh)
# #
# # logger.debug('debug message' )
# # logger.info('info message')
# # logger.warn('warn message')
# # logger.error('error message')
# # logger.critical('critical message')
#

# print(__name__)

# way1
from lib import commons as aa

aa.login()