Skip to content

Instantly share code, notes, and snippets.

@pyaf
Created March 24, 2017 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pyaf/5d101cb8b762984b4c6460a27b36feae to your computer and use it in GitHub Desktop.
Save pyaf/5d101cb8b762984b4c6460a27b36feae to your computer and use it in GitHub Desktop.
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