#NEWLINE# @ app . route ( '/feedback/' , methods = [ 'GET' , 'POST' ] ) #NEWLINE# def feedback( ) : #NEWLINE# #INDENT# if ( not config . CONFIG_DB . feedback_email ) : #NEWLINE# #INDENT# return flask . abort ( 418 ) #NEWLINE# #UNINDENT# form = FeedbackForm ( obj = auth . current_user_db ( ) ) #NEWLINE# if ( ( not config . CONFIG_DB . has_anonymous_recaptcha ) or auth . is_logged_in ( ) ) : #NEWLINE# #INDENT# del form . recaptcha #NEWLINE# #UNINDENT# if form . validate_on_submit ( ) : #NEWLINE# #INDENT# body = ( '%s\n\n%s' % ( form . message . data , form . email . data ) ) #NEWLINE# kwargs = ( { #NEWLINE# #INDENT# 'reply_to' : form . email . data , #NEWLINE# #UNINDENT# } if form . email . data else { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# task . send_mail_notification ( ( '%s...' % body [ : 48 ] . strip ( ) ) , body , ** kwargs ) #NEWLINE# flask . flash ( __ ( 'Thank you for your feedback!' ) , category = 'success' ) #NEWLINE# return flask . redirect ( flask . url_for ( 'welcome' ) ) #NEWLINE# #UNINDENT# return flask . render_template ( 'feedback.html' , title = _ ( 'Feedback' ) , html_class = 'feedback' , form = form )