create initial models and mobile test for mojtaba eshaghi
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user