Mercurial > sat_legacy_website
comparison sat_website/forms.py @ 94:c1b77f07f644
replace shipped file unicodecsv.py with the module of the same name
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 23 Jun 2015 18:34:14 +0200 |
parents | 13ebb548f234 |
children | dc8a30f6c369 |
comparison
equal
deleted
inserted
replaced
93:9ae3d9c8b28a | 94:c1b77f07f644 |
---|---|
257 return MSG.format(**data) | 257 return MSG.format(**data) |
258 | 258 |
259 def writeResultToCSV(self): | 259 def writeResultToCSV(self): |
260 result = [unicode(value) for key, value in self.results(False)] | 260 result = [unicode(value) for key, value in self.results(False)] |
261 with open(settings.ASSO_SUBSCR_CSV, 'a+') as csvfile: | 261 with open(settings.ASSO_SUBSCR_CSV, 'a+') as csvfile: |
262 writer = unicodecsv.UnicodeWriter(csvfile, delimiter=';') | 262 writer = unicodecsv.writer(csvfile, delimiter=';') |
263 writer.writerow(result) | 263 writer.writerow(result) |
264 | 264 |
265 def process_submitted_data(self): | 265 def process_submitted_data(self): |
266 """Send emails to the subscriber and the admins.""" | 266 """Send emails to the subscriber and the admins.""" |
267 if not self.is_valid(): | 267 if not self.is_valid(): |