You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really liked your project! Can you please help me implement the update of the User, so that when the email changes, a confirmation comes to the mail, and when the phone changes, sms confirmation comes. Thanks in advance!
My models:
I really liked your project! Can you please help me implement the update of the User, so that when the email changes, a confirmation comes to the mail, and when the phone changes, sms confirmation comes. Thanks in advance!
My models:
class CustomUser(AbstractUser):
APPLICANT = "Applicant"
EMPLOYER = "Employer"
ROLE_CHOICES = (
(APPLICANT, "Applicant"),
(EMPLOYER, "Employer"),
)
username = models.CharField(max_length=255, unique=True, blank=True, null=True)
email = models.EmailField(("email address"), unique=False, max_length=254, blank=True,null=True)
role = models.CharField(max_length=50, choices=ROLE_CHOICES)
avatar = models.ImageField(("avatar"), upload_to="avatars/", null=True, blank=True)
is_staff = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
created_date = models.DateTimeField(auto_now_add=True)
updated_date = models.DateTimeField(auto_now=True)
blocked_until = models.DateTimeField(null=True, blank=True)
USERNAME_FIELD = "username"
REQUIRED_FIELDS = []
class PhoneNumber(models.Model):
user = models.OneToOneField(CustomUser, related_name='phone', on_delete=models.CASCADE)
phone_number = PhoneNumberField(unique=True)
security_code = models.CharField(max_length=120)
is_verified = models.BooleanField(default=False)
sent = models.DateTimeField(null=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
The text was updated successfully, but these errors were encountered: