def post(self): with form_validator('email'): email = self.get_argument('email') with form_validator('password'): password = self.get_argument('password') try: self.log_in(email, password) self.write({'status':'success'}) except: self.set_status(403) self.write({ 'status':'error', 'message':"That email/password combination doesn't look right"})
def post(self): with form_validator('password'): password = self.get_argument('password') with from_validator('email'): email = self.get_argument('email') self.sign_up(email, password) self.write({'status':'success'})