scripts/fetch_name_gender.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Fri, 06 Aug 2010 14:41:41 +0530
branchanoop
changeset 219 3d3e4e4afb61
parent 204 a190811581a8
permissions -rw-r--r--
Fixed a blatant bug with the looping element in the send mail script for accommodation allotment.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
204
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     1
from sdi.models import ParticipantInfo
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     2
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     3
f = open('names.txt', 'w')
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     4
for participant in participants:
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     5
    f.write('%s %s, %s\n' % (participant.participant.first_name, participant.participant.last_name, participant.participant.gender))
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     6
a190811581a8 Added a script to generate CSV of full name and gender of participants who have confirmed participation.
Madhusudan.C.S <madhusudancs@fossee.in>
parents:
diff changeset
     7
f.close()