This worked last week. Maybe I did something wrong and messed it up somewhere else, or maybe it is a bug, or maybe it is just an update and I missed it while reading the docs.
I have a pipeline that gets the user's avatar and saves the URL:
def get_avatar(strategy, details, response, user, *args, **kwargs):
url = None
if strategy.backend.name == 'facebook':
url = 'http://graph.facebook.com/{0}/picture'.format(response['id'])
elif strategy.backend.name == "twitter":
if response['profile_image_url'] != '':
url = response['profile_image_url']
elif strategy.backend.name == "google-oauth2":
if response['image'].get('url') is not None:
url = response['image'].get('url')
It used to work, now, it gives me the error:
'DjangoStrategy' object has no attribute 'backend'
Please help, some beta users are already using my website and for the moment, they don't have a profile image.