Last active
August 27, 2015 04:47
-
-
Save heyitsjames/bbbb126d4a9db7a1d562 to your computer and use it in GitHub Desktop.
here ya go mikey
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
# you'll need to import this guy | |
from datetime import datetime | |
date_created = datetime.strptime(d['DateCreated'], 'YYYYMMddThh:mm:ss Z') | |
name = d['Name'] | |
contact_group = d['ContactGroup'] | |
fk_dict = { | |
'contact_group': 'contact_group_id', | |
'other_thing': 'other_thing_id' | |
} | |
if field in fk_dict: | |
# use fk_dict[field] as the name of the variable | |
return Contact(name=name, date_created=date_created, contact_group_id=contact_group) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment