#NEWLINE# @ any_permission_required ( [ ( 'Admin' , '%' ) , ( 'MailingLists' , 'View' ) ] ) #NEWLINE# def email_addresses_file( request ) : #NEWLINE# #INDENT# resp = http . HttpResponse ( ) #NEWLINE# resp [ 'Content-Type' ] = 'text/plain; charset=utf-8' #NEWLINE# resp [ 'Content-Disposition' ] = 'attachment; filename=amo_optin_emails.txt' #NEWLINE# emails = UserProfile . objects . filter ( notifications__notification_id = 13 , notifications__enabled = 1 ) . values_list ( 'email' , flat = True ) #NEWLINE# for e in emails : #NEWLINE# #INDENT# if ( e is not None ) : #NEWLINE# #INDENT# resp . write ( ( e + '\n' ) ) #NEWLINE# #UNINDENT# #UNINDENT# return resp