MCPcopy
hub / github.com/liangliangyy/DjangoBlog / oauth_user_login_signal_handler

Function oauth_user_login_signal_handler

djangoblog/blog_signals.py:55–64  ·  view source on GitHub ↗
(sender, **kwargs)

Source from the content-addressed store, hash-verified

53
54@receiver(oauth_user_login_signal)
55def oauth_user_login_signal_handler(sender, **kwargs):
56 id = kwargs['id']
57 oauthuser = OAuthUser.objects.get(id=id)
58 site = get_current_site().domain
59 if oauthuser.picture and not oauthuser.picture.find(site) >= 0:
60 from djangoblog.utils import save_user_avatar
61 oauthuser.picture = save_user_avatar(oauthuser.picture)
62 oauthuser.save()
63
64 delete_sidebar_cache()
65
66
67@receiver(post_save)

Callers

nothing calls this directly

Calls 5

get_current_siteFunction · 0.90
save_user_avatarFunction · 0.90
delete_sidebar_cacheFunction · 0.90
getMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected