deploy login & reCaptcha
This commit is contained in:
15
apps/captcha_app/api/v1/serializers.py
Normal file
15
apps/captcha_app/api/v1/serializers.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from rest_captcha.serializers import RestCaptchaSerializer
|
||||
from rest_captcha import utils
|
||||
from rest_captcha.settings import api_settings
|
||||
from django.core.cache import caches
|
||||
|
||||
cache = caches[api_settings.CAPTCHA_CACHE]
|
||||
|
||||
|
||||
def noise_default(image, draw):
|
||||
draw = utils.noise_dots(draw, image, api_settings.CAPTCHA_FOREGROUND_COLOR)
|
||||
# draw = utils.noise_arcs(draw, image, api_settings.CAPTCHA_FOREGROUND_COLOR)
|
||||
|
||||
|
||||
class HumanOnlyDataSerializer(RestCaptchaSerializer): # noqa
|
||||
pass
|
||||
Reference in New Issue
Block a user