Created
March 20, 2013 21:43
-
-
Save felipe-prenholato/5208763 to your computer and use it in GitHub Desktop.
just a concept
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save_name(fvalue, row): | |
# save name on auth.User, user row['email'] as key | |
return | |
def save_graduation(fvalue, row): | |
# save graduation on accounts.UserProfile, user row['email'] to get user and than get_profile() | |
return | |
function_dict = {'name': save_name, | |
'graduation': save_graduation} | |
for row in reader: | |
for fname, fvalue in row.items(): | |
function_dict[fname](fvalue, row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment