From 671ccd0595f1624bfb8337b75a583771fb5dbc31 Mon Sep 17 00:00:00 2001 From: Lude Ribeiro Date: Mon, 22 Nov 2021 10:16:40 -0300 Subject: [PATCH] Atualizando para fazer pull --- sigi/apps/eventos/views.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sigi/apps/eventos/views.py b/sigi/apps/eventos/views.py index dc530e5..379e7c2 100644 --- a/sigi/apps/eventos/views.py +++ b/sigi/apps/eventos/views.py @@ -297,6 +297,11 @@ def deleta_itens_carrinho(request): @login_required def export_csv(request): + # response = HttpResponse(content_type='text/csv') + # response['Content-Disposition'] = 'attachment; filename=eventos.csv' + + # csv_writer = csv.writer(response) + # eventos = carrinhoOrGet_for_qs(request) def serialize(r, field): value = (getattr(r, 'get_{0}_display'.format(field.name), None) or getattr(r, field.name, "")) @@ -366,6 +371,8 @@ def export_csv(request): writer.writerow(reg) if evento.convite_set.count() == 0: writer.writerow(reg) + + # csv_writer.writerow(reg) return response