Пример #1
0
async def check(info):
#     print(parse_qs(info.query_string))
    username = parse_qs(info.query_string)["username"][0]
    password = parse_qs(info.query_string)["password"][0]
    msg = "fail!"  
    model = Model()
    if model.checkUserSAndpwd(username, password):
        msg = "success!"
    else:
        pass
    return web.Response(body=html("msg.html",**locals()),content_type="text/html")
Пример #2
0
async def check(info):
    #     print(parse_qs(info.query_string))
    username = parse_qs(info.query_string)["username"][0]
    password = parse_qs(info.query_string)["password"][0]
    msg = "fail!"
    #     if username=="wxit" and password=="wxit":
    #         msg = "success!"
    #     else:
    #         pass
    if checkUserAndPwd(username, password):
        msg = "success!"
    else:
        pass
    return web.Response(body=html("msg.html", **locals()),
                        content_type="text/html")