Browse Source

Alterando opção para exportar todas as casas

diagnosticos
Camilo Carlos (Estagiario) 14 years ago
parent
commit
c31b252ef1
  1. 2
      sigi/apps/casas/views.py

2
sigi/apps/casas/views.py

@ -219,7 +219,7 @@ def export_csv(request):
response['Content-Disposition'] = 'attachment; filename=casas.csv' response['Content-Disposition'] = 'attachment; filename=casas.csv'
csv_writer = csv.writer(response) csv_writer = csv.writer(response)
casas = CasaLegislativa.objects.filter(municipio__uf__sigla=u'MG') casas = CasaLegislativa.objects.all()
for casa in casas: for casa in casas:
csv_writer.writerow([casa.nome.encode("utf-8"), casa.municipio.uf.sigla.encode("utf-8")]) csv_writer.writerow([casa.nome.encode("utf-8"), casa.municipio.uf.sigla.encode("utf-8")])

Loading…
Cancel
Save