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
random.seed(key) # Do not generate different images for the same key
This random.seed(key) can NOT ensure to generate the same images at high concurrent requests scenario.
Suggest to use private_random_generator = random.Random(key) to create a function private random generator, and use private_random_generator.choices and private_random_generator.randrange in the image generate function.
The text was updated successfully, but these errors were encountered:
captcha/views.py:50
random.seed(key) # Do not generate different images for the same key
This
random.seed(key)
can NOT ensure to generate the same images at high concurrent requests scenario.Suggest to use
private_random_generator = random.Random(key)
to create a function private random generator, and useprivate_random_generator.choices
andprivate_random_generator.randrange
in the image generate function.The text was updated successfully, but these errors were encountered: