#NEWLINE# def POST( self ) : #NEWLINE# #INDENT# i = web . input ( email = '' , password = '' , password_confirm = '' ) #NEWLINE# if ( not waltz . utils . valid_email ( i . email ) ) : #NEWLINE# #INDENT# return self . GET ( msg = 'invalid email' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# u = User ( i . email ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# u = User . register ( i . email , i . password , passwd2 = i . password_confirm ) #NEWLINE# session ( ) . update ( { #NEWLINE# #INDENT# 'logged' : True , #NEWLINE# 'email' : self . email , #NEWLINE# #UNINDENT# } ) #NEWLINE# raise web . seeother ( '/' ) #NEWLINE# #UNINDENT# return Login ( ) . GET ( msg = 'User already exists' )