From 7b4e7857b5ee65e467dc7e883cd80086f2ef2b98 Mon Sep 17 00:00:00 2001 From: "Martin Z. (Zimamazim)" Date: Thu, 20 Jun 2019 22:45:28 +0200 Subject: [PATCH] zmena CSV writeru --- seminar/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/seminar/views.py b/seminar/views.py index ec233fc4..d55a4d0c 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -14,7 +14,6 @@ from django.contrib.auth import authenticate, login from .models import Problem, Cislo, Reseni, Nastaveni, Rocnik, Soustredeni, Organizator, Resitel, Novinky, Soustredeni_Ucastnici, Pohadka, Tema, Clanek #from .models import VysledkyZaCislo, VysledkyKCisluZaRocnik, VysledkyKCisluOdjakziva from . import utils -from .unicodecsv import UnicodeWriter from .forms import NameForm from datetime import timedelta, date, datetime @@ -629,7 +628,7 @@ def soustredeniUcastniciExportView(request,soustredeni): response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename="ucastnici.csv"' - writer = UnicodeWriter(response) + writer = csv.writer(response) writer.writerow(["jmeno", "prijmeni", "rok_maturity", "telefon", "email", "ulice", "mesto", "psc","stat"]) for u in ucastnici: writer.writerow([u.jmeno, u.prijmeni, str(u.rok_maturity), u.telefon, u.email, u.ulice, u.mesto, u.psc, u.stat.name])