@bp.route('/login', methods=['GET', 'POST'])
def login():
"""
Administrator login。
:return:
"""
if request.method == 'GET':
return render_template('pages/lyear_pages_login.html')
else:
form = AdminLoginForm(request.form)
if form.validate():
adminname = form.adminname.data
password = form.password.data
admin = AdminModel.query.filter_