deploy login & reCaptcha
This commit is contained in:
12
apps/captcha_app/exceptions.py
Normal file
12
apps/captcha_app/exceptions.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from rest_framework.exceptions import APIException
|
||||
from rest_framework import status
|
||||
|
||||
|
||||
class CaptchaFailed(APIException):
|
||||
"""
|
||||
raised exception when user entered wrong captcha code
|
||||
"""
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = _('Wrong Captcha')
|
||||
default_code = 'wrong captcha'
|
||||
Reference in New Issue
Block a user