Renamed the header of the CSV to 'to' from 'number' to allow for email jobs

- added new columns to Job and Notification to capture the start/end dates accurately
This commit is contained in:
Martyn Inglis
2016-02-25 09:59:50 +00:00
parent b3884e2d6c
commit 10a764a2c1
16 changed files with 271 additions and 80 deletions

View File

@@ -1,12 +1,12 @@
import csv
def get_mobile_numbers_from_csv(file_data):
def get_recipient_from_csv(file_data):
numbers = []
reader = csv.DictReader(
file_data.splitlines(),
lineterminator='\n',
quoting=csv.QUOTE_NONE)
for i, row in enumerate(reader):
numbers.append(row['phone'].replace(' ', ''))
numbers.append(row['to'].replace(' ', ''))
return numbers