#NEWLINE# def resend_confirmation( ) : #NEWLINE# #INDENT# 'View for resending an email confirmation email.\n    ' #NEWLINE# form = ResendConfirmationForm ( request . form ) #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# if form . validate ( ) : #NEWLINE# #INDENT# clean_email = form . email . data #NEWLINE# user = get_user ( email = clean_email ) #NEWLINE# if ( not user ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# send_confirm_email ( clean_email , clean_email ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# status_message = 'Email has already been confirmed.' #NEWLINE# kind = 'warning' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# status_message = 'Resent email to {0}' . format ( clean_email ) #NEWLINE# kind = 'success' #NEWLINE# #UNINDENT# status . push_status_message ( status_message , kind = kind , trust = False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# forms . push_errors_to_status ( form . errors ) #NEWLINE# #UNINDENT# #UNINDENT# return { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# }