create initial models and mobile test for mojtaba eshaghi

This commit is contained in:
2025-05-05 15:25:46 +03:30
parent 7e301c14b7
commit ec58d9ef5e
167 changed files with 614 additions and 23 deletions

View File

@@ -22,9 +22,7 @@ class CustomizeRestCaptchaView(views.APIView):
key = str(uuid.uuid4())
value = random_char_challenge(settings.CAPTCHA_LENGTH)
cache_key = utils.get_cache_key(key)
print(cache_key)
cache.set(cache_key, value, settings.CAPTCHA_TIMEOUT)
print(cache.get(cache_key))
# generate image
image_bytes = generate_image(value)
@@ -37,7 +35,3 @@ class CustomizeRestCaptchaView(views.APIView):
'image_decode': 'base64'
}
return response.Response(data)
def get(self, request):
key = cache.get("rest_captcha_9e3ca166-c2f8-41e8-8f19-aa6f520fc123.0")
return response.Response(key)