Exemplo n.º 1
0
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('非法提交')
Exemplo n.º 2
0
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('非法提交')
Exemplo n.º 3
0
def userinfo():
    user_dict=read_file()
    return render_template('index.html',user_dict=user_dict)
Exemplo n.º 4
0
def userinfo():
    user_dict = read_file()
    return render_template('index.html', user_dict=user_dict)