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'd use an authentication base token, I have a function to generate verify code and send it to email when having a registration, so I want combine 'ACTIVATION_URL': 'activate/{uid}/{token} and 'SEND_ACTIVATION_EMAIL': True,
'SEND_ACTIVATION_EMAIL': True, after having a registration
@api_view(http_method_names=["POST"])defsend_otp(request):
try:
email=Member.objects.filter(email=request.data['email']).first()
exceptMember.DoesNotExist:
raiseValidationError("Member does not exists")
digits="0123456789"otp=""foriinrange(6):
otp+=digits[math.floor(random.random() *10)]
# Send verification emailsend_verification_email(email, top)
```
`'ACTIVATION_URL': 'activate/{uid}/{token}`whenthevalidatecodematched
The text was updated successfully, but these errors were encountered:
I'd use an authentication base token, I have a function to generate verify code and send it to email when having a registration, so I want combine
'ACTIVATION_URL': 'activate/{uid}/{token}
and'SEND_ACTIVATION_EMAIL': True,
'SEND_ACTIVATION_EMAIL': True,
after having a registrationThe text was updated successfully, but these errors were encountered: