From c8fb4cdbe9a405d955dafccfa1715da664afea10 Mon Sep 17 00:00:00 2001 From: ludo Date: Mon, 27 Jun 2016 19:11:39 +0200 Subject: [PATCH 1/2] fix l'export des membres du COF --- gestioncof/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gestioncof/views.py b/gestioncof/views.py index 70084e14..886083c8 100644 --- a/gestioncof/views.py +++ b/gestioncof/views.py @@ -403,7 +403,7 @@ def export_members(request): response = HttpResponse(content_type = 'text/csv') response['Content-Disposition'] = 'attachment; filename=membres_cof.csv' - writer = unicodecsv.UnicodeWriter(response) + writer = unicodecsv.writer(response) for profile in CofProfile.objects.filter(is_cof = True).all(): user = profile.user bits = [profile.num, user.username, user.first_name, user.last_name, user.email, profile.phone, profile.occupation, profile.departement, profile.type_cotiz] From 315606e254332a3c804a58073edbde55c5518395 Mon Sep 17 00:00:00 2001 From: ludo Date: Mon, 27 Jun 2016 19:13:53 +0200 Subject: [PATCH 2/2] fix l'export des membres du COF --- gestioncof/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestioncof/views.py b/gestioncof/views.py index 886083c8..a862c773 100644 --- a/gestioncof/views.py +++ b/gestioncof/views.py @@ -415,7 +415,7 @@ def export_members(request): def csv_export_mega(filename, qs): response = HttpResponse(content_type = 'text/csv') response['Content-Disposition'] = 'attachment; filename=' + filename - writer = unicodecsv.UnicodeWriter(response) + writer = unicodecsv.writer(response) for reg in qs.all(): user = reg.user @@ -431,7 +431,7 @@ def export_mega_remarksonly(request): filename = 'remarques_mega_2015.csv' response = HttpResponse(content_type = 'text/csv') response['Content-Disposition'] = 'attachment; filename=' + filename - writer = unicodecsv.UnicodeWriter(response) + writer = unicodecsv.writer(response) event = Event.objects.get(title = "Mega 15") commentfield = event.commentfields.get(name = "Commentaires")