Skip to content

Instantly share code, notes, and snippets.

@felipe-prenholato
Created March 20, 2013 21:43
Show Gist options
  • Save felipe-prenholato/5208763 to your computer and use it in GitHub Desktop.
Save felipe-prenholato/5208763 to your computer and use it in GitHub Desktop.
just a concept
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