77 ):
78 raise ValidationError(
79 {
80 "msg": "The password needs to be more than 8 characters, contain atleast one uppercase,one lowercase and a special character" 81 }
82 )
83
164 ):
165 raise ValidationError(
166 {
167 "msg": "The password needs to be more than 8 characters, contain atleast one uppercase,one lowercase and a special character"168 }
169 )
170 user = authenticate(email=userEmail, password=newPassword)
20 subject = "Here's your account verification mail"
21 otp = random.randint(1001, 9999)
22 text = f"Your One Time Password for verification on Bulk-Mailer is {otp}.\nValid for only 2 minutes.\n DO NOT SHARE IT WITH ANYBODY.\nSKILL EDGE"
23 style = f'<p>Your One Time Password for verification on Bulk-Mailer is <strong style="font-size: 18px;">{otp}</strong>.</p><p>Valid for only 2 minutes.</p><p style="font-size: 18px;">DO NOT SHARE IT WITH ANYBODY.</p><div style="text-align:center; font-size:40px; color:grey; margin-top:20px;"><strong>BULK MAILER</strong></div>'24 email_by = settings.EMAIL_HOST
25 otp_msg = EmailMultiAlternatives(subject, text, f"SDC <{email_by}>", [email])
26 otp_msg.attach_alternative(style, "text/html")
19def send_otp(self, email):
20 subject = "Here's your account verification mail"
21 otp = random.randint(1001, 9999)
22 text = f"Your One Time Password for verification on Bulk-Mailer is {otp}.\nValid for only 2 minutes.\n DO NOT SHARE IT WITH ANYBODY.\nSKILL EDGE"23 style = f'<p>Your One Time Password for verification on Bulk-Mailer is <strong style="font-size: 18px;">{otp}</strong>.</p><p>Valid for only 2 minutes.</p><p style="font-size: 18px;">DO NOT SHARE IT WITH ANYBODY.</p><div style="text-align:center; font-size:40px; color:grey; margin-top:20px;"><strong>BULK MAILER</strong></div>'
24 email_by = settings.EMAIL_HOST
25 otp_msg = EmailMultiAlternatives(subject, text, f"SDC <{email_by}>", [email])
113
114AUTH_PASSWORD_VALIDATORS = [
115 {
116 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",117 },
118 {
119 "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
Line length greater than configured max_line_length
detected, defaults to 79 character. This limit can be configured docs