#NEWLINE# @ bp . route ( '/signup' , methods = [ 'GET' , 'POST' ] ) #NEWLINE# @ VisitorPermission ( ) #NEWLINE# def signup( ) : #NEWLINE# #INDENT# 'Signup' #NEWLINE# form = SignupForm ( ) #NEWLINE# if form . validate_on_submit ( ) : #NEWLINE# #INDENT# params = form . data . copy ( ) #NEWLINE# params . pop ( 'repassword' ) #NEWLINE# user = User ( ** params ) #NEWLINE# db . session . add ( user ) #NEWLINE# db . session . commit ( ) #NEWLINE# signin_user ( user ) #NEWLINE# return redirect ( url_for ( 'site.index' ) ) #NEWLINE# #UNINDENT# return render_template ( 'account/signup/signup.html' , form = form )