Exemplo n.º 1
0
 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, 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def GET(self):
     return render.register(forms.register())
Exemplo n.º 4
0
 def GET(self):
     return render.register(forms.register())