zmena CSV writeru
This commit is contained in:
parent
31f7edc39f
commit
7b4e7857b5
1 changed files with 1 additions and 2 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue