#NEWLINE# @ app . route ( '/profile/<profile_id>/products.csv' , methods = [ 'GET' ] ) #NEWLINE# def profile_products_csv( profile_id ) : #NEWLINE# #INDENT# profile = get_user_for_response ( profile_id , request ) #NEWLINE# csv = profile . csv_of_products ( ) #NEWLINE# resp = make_response ( csv , 200 ) #NEWLINE# resp . mimetype = 'text/csv;charset=UTF-8' #NEWLINE# resp . headers . add ( 'Content-Disposition' , 'attachment; filename=impactstory-{profile_id}.csv' . format ( profile_id = csv ) ) #NEWLINE# resp . headers . add ( 'Content-Encoding' , 'UTF-8' ) #NEWLINE# return resp