Created
March 24, 2017 17:35
-
-
Save pyaf/5d101cb8b762984b4c6460a27b36feae to your computer and use it in GitHub Desktop.
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_profile(sender, instance, **kwargs): | |
print(instance) | |
instance.user.full_name = instance.extra_data['name'] | |
uid = instance.extra_data['id'] | |
instance.user.profile_picture = instance.get_avatar_url() | |
instance.user.save() | |
post_save.connect(save_profile, sender=SocialAccount) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment