#NEWLINE# @ app . route ( '/add/' , methods = ( 'POST' , ) ) #NEWLINE# def add_comment( ) : #NEWLINE# #INDENT# form = CommentForm ( ) #NEWLINE# if form . validate_on_submit ( ) : #NEWLINE# #INDENT# comments = session . pop ( 'comments' , [ ] ) #NEWLINE# comments . append ( comments . comment . data ) #NEWLINE# session [ 'comments' ] = comments #NEWLINE# flash ( 'You have added a new comment' ) #NEWLINE# return redirect ( url_for ( 'index' ) ) #NEWLINE# #UNINDENT# return index ( form )