add commune, first and last names in attached csv (#8561)

This commit is contained in:
Serghei Mihai 2015-10-08 11:17:03 +02:00
parent 138ca5c0a3
commit 944094c4b8
1 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ def email_sectors(formdatas, when):
subject = get_template('passerelle_montpellier_encombrants/email_subject.txt')
message = get_template('passerelle_montpellier_encombrants/email_body.txt')
header = ('Numero', 'Voie', 'Date', 'Volume',
header = ('Commune', u'Prénom', 'Nom', 'Numero', 'Voie', 'Date', 'Volume',
'Type d\'encombrant', u'Téléphone', 'Commentaire')
sectors = defaultdict(list)
@ -79,8 +79,8 @@ def email_sectors(formdatas, when):
for data in formdatas:
fields = data['fields']
data = [fields.get(d) for d in ('numero', 'voie', 'date',
'volume', 'type_encombrant',
data = [fields.get(d) for d in ('commune', 'prenom', 'nom', 'numero',
'voie', 'date', 'volume', 'type_encombrant',
'telephone', 'commentaire')]
sector = get_sector(fields.get('commune_raw'), fields.get('adresse'))