#NEWLINE# @ app . route ( '/results' ) #NEWLINE# def add_results( ) : #NEWLINE# #INDENT# 'When poll_task indicates the task is done, the progress page redirects here using JavaScript.' #NEWLINE# task_id = request . args . get ( 'tid' ) #NEWLINE# task = add . get_task ( task_id ) #NEWLINE# if ( not task ) : #NEWLINE# #INDENT# return redirect ( '/' ) #NEWLINE# #UNINDENT# result = task . return_value #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# return redirect ( ( '/progress?tid=' + task_id ) ) #NEWLINE# #UNINDENT# task . delete ( ) #NEWLINE# return render_template ( 'results.html' , value = result )