Browse Source

Opraven export CSV a mailu ucastniku.

export_seznamu_prednasek
parent
commit
d017542990
  1. 2
      seminar/templates/seminar/soustredeni/maily_ucastniku.txt
  2. 2
      seminar/views.py

2
seminar/templates/seminar/soustredeni/maily_ucastniku.txt

@ -1 +1 @@
{% for sous_ucast in object_list %}{{ sous_ucast.resitel.email }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% for sous_ucast in object_list %}{{ sous_ucast.resitel.osoba.email }}{% if not forloop.last %}, {% endif %}{% endfor %}

2
seminar/views.py

@ -631,7 +631,7 @@ def soustredeniUcastniciExportView(request,soustredeni):
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])
writer.writerow([u.osoba.jmeno, u.osoba.prijmeni, str(u.rok_maturity), u.osoba.telefon, u.osoba.email, u.osoba.ulice, u.osoba.mesto, u.osoba.psc, u.osoba.stat.name])
return response

Loading…
Cancel
Save