def handle(self, *args, **options):
     writer = csv.writer(self.stdout)
     header_row = DataExport.report_mailchimp_header_row()
     writer.writerow(header_row)
     for row in DataExport.report_mailchimp():
         writer.writerow(row)
     self.stderr.write(self.style.SUCCESS('Successfully generated report'))
Exemple #2
0
 def handle(self, *args, **options):
     writer = csv.writer(self.stdout)
     header_row = DataExport.report_mailchimp_header_row()
     writer.writerow(header_row)
     for row in DataExport.report_mailchimp():
         writer.writerow(row)
     self.stderr.write(self.style.SUCCESS('Successfully generated report'))
def mailchimp_report(request):
    response = HttpResponse(content_type='text/csv')
    response['Content-Disposition'] = 'attachment; filename="mailchimp.csv"'
    writer = csv.writer(response)

    header_row = DataExport.report_mailchimp_header_row()
    writer.writerow(header_row)
    for row in DataExport.report_mailchimp():
        writer.writerow(row)

    return response
Exemple #4
0
def mailchimp_report(request):
    response = HttpResponse(content_type='text/csv')
    response['Content-Disposition'] = 'attachment; filename="mailchimp.csv"'
    writer = csv.writer(response)

    header_row = DataExport.report_mailchimp_header_row()
    writer.writerow(header_row)
    for row in DataExport.report_mailchimp():
        writer.writerow(row)

    return response