How to reference a field on a related model using django-allauth in the template?

I have the authorization through the social network. The model Profile(additional information about the user) Is the ratio OneToOneField() with a User model(authorization information) . How do I display the fields from the model Profile, if the template is passed only information about the account {% load socialaccount %} from django-allauth? Thanks in advance.
April 3rd 20 at 18:50
1 answer
April 3rd 20 at 18:52
Use related_name to get access to a coherent model.

class Profile(models.model):
 user = models.OneToOneField (User,on_delete = ...., related_name = 'profile')

In the template
{{ user.profile.field }}
Can also set a value for reletad_name for the model by default:
class Profile(models.Model):
 class Meta:
 default_related_name = 'profile'

Find more questions by tags Django