def POST(self): email, passwd, name = self.arguments('email', 'passwd', 'name') if email and passwd: uid = account_new(email, passwd, name) if uid: return self.redirect('/signin') return self.render()
def _on_auth(self, user): if not user: raise tornado.web.HTTPError(500, "Google auth failed") else: name = user['name'] email = user['email'] user_id = account_new(name, email) login(self, user_id) self.redirect('/:')