From d017542990e396caccb4c4fb8d4926c36abcd139 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Thu, 20 Jun 2019 22:58:21 +0200 Subject: [PATCH] Opraven export CSV a mailu ucastniku. --- seminar/templates/seminar/soustredeni/maily_ucastniku.txt | 2 +- seminar/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/seminar/templates/seminar/soustredeni/maily_ucastniku.txt b/seminar/templates/seminar/soustredeni/maily_ucastniku.txt index 8060ce2a..74c25c91 100644 --- a/seminar/templates/seminar/soustredeni/maily_ucastniku.txt +++ b/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 %} diff --git a/seminar/views.py b/seminar/views.py index d55a4d0c..7ac0701e 100644 --- a/seminar/views.py +++ b/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