def POST(self): i = web.input(remember=False, redirect='/') f = forms.register() if not f.validates(i): return render.register(f) else: from infogami.infobase.client import ClientException try: web.ctx.site.register(i.username, i.displayname, i.email, i.password) except ClientException as e: f.note = str(e) return render.register(f) web.setcookie(config.login_cookie_name, web.ctx.conn.get_auth_token()) raise web.seeother(i.redirect)
def GET(self): return render.register(forms.register())