Strip whitespace during import
This commit is contained in:
parent
780d72f3b9
commit
87b66336e6
|
|
@ -20,10 +20,10 @@ class Command(BaseCommand):
|
||||||
with open(abs_path) as f:
|
with open(abs_path) as f:
|
||||||
reader = csv.DictReader(f)
|
reader = csv.DictReader(f)
|
||||||
for row in reader:
|
for row in reader:
|
||||||
email = row['Email'].lower()
|
email = row['Email'].lower().strip()
|
||||||
school_class_names = [c.strip() for c in row['Klassen'].split(',')]
|
school_class_names = [c.strip() for c in row['Klassen'].split(',')]
|
||||||
first_name = row['Vorname']
|
first_name = row['Vorname'].strip()
|
||||||
last_name = row['Nachname']
|
last_name = row['Nachname'].strip()
|
||||||
|
|
||||||
self.stdout.write("Creating user {} {}, {}".format(first_name, last_name, email))
|
self.stdout.write("Creating user {} {}, {}".format(first_name, last_name, email))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue