def POST(self): name, pwd = web.input().username, web.input().password user = models.User.get(username=name) if not user: return render.login(is_loggedin(), True) if bcrypt.verify(pwd, user.password): raise authorize(user) return render.login(is_loggedin(), True)
def GET(self): return render.login(is_loggedin())