I want to access the extra-data
dictionary provided by SocialAccount
. I need to store the family name of the user in a variable. I have attached the the code below. The following code throws an error:
name 'SocialAccount' is not defined.
I saw this on Django allauth Social application extra data.
data=SocialAccount.objects.get(user=request.user).extra_data
follows=data.get('family_name')
return render(request, 'main/index.html', {"name":follows})
How do I fix this?