def GetLogin(): if request.method == 'POST': username=request.form.get('username') password=request.form.get('password') user_dict=read_file() if username in user_dict.keys(): if password == user_dict[username][0]: return redirect('/userinfo') else: return Response('密码错误') else: return Response('帐号不存在') else: return Response('非法提交')
def GetLogin(): if request.method == 'POST': username = request.form.get('username') password = request.form.get('password') user_dict = read_file() if username in user_dict.keys(): if password == user_dict[username][0]: return redirect('/userinfo') else: return Response('密码错误') else: return Response('帐号不存在') else: return Response('非法提交')
def userinfo(): user_dict=read_file() return render_template('index.html',user_dict=user_dict)
def userinfo(): user_dict = read_file() return render_template('index.html', user_dict=user_dict)