Good afternoon guys from stackoverflow, my question is the following I am creating a simple user profile model and I want the email to be saved directly from the django-allauth email field. code.
from django.contrib.auth.models import User
class Profile(models.Model):
name = models.CharField(verbose_name='name_profile', max_length=64, unique=False)
coname = models.CharField(verbose_name='coname_profile', max_length=64, unique=False)
email = models.EmailField()
username = models.CharField(verbose_name='email_profile', max_length=64)
address = models.CharField(verbose_name='address_profile', max_length=100)
class Meta:
return self.email = request.user.email
Please take into account the django-allauth module