diff --git a/tienda/models.py b/tienda/models.py index 1cab708..f0b9775 100644 --- a/tienda/models.py +++ b/tienda/models.py @@ -46,7 +46,7 @@ class VerificationCode(models.Model): def generate(user: User, code_mode: str) -> VerificationCode: while True: - code = "".join(random.choices(string.ascii_letters+string.digits+string.punctuation)) + code = "".join(random.choices(string.ascii_letters+string.digits+string.punctuation, k=64)) if not VerificationCode.objects.filter(code=code).exists(): return VerificationCode.objects.create( code = code,