Python, Django, Django Rest Framework, Backend, Programming.
user.phone) send_otp(user.phone, otp, user) return Response("Successfully generated OTP", status=status.HTTP_200_OK) except ObjectDoesNotExist: user_ = User.objects.create(phone=phone) print(user_) otp = random.randint(1000, 9999) otp_expiry = timezone.now() + datetime.timedelta(minutes=10)