mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-05-12 02:02:10 +00:00
* feat: 忘记密码支持通过手机找回,邮箱方式修改为和手机方式一致 * feat: 翻译 * feat: 修改翻译 * fix: 还原 Co-authored-by: Jiangjie.Bai <bugatti_it@163.com>
22 lines
636 B
Python
22 lines
636 B
Python
from django.utils.translation import gettext_lazy as _
|
|
|
|
from common.exceptions import JMSException
|
|
|
|
|
|
class CodeExpired(JMSException):
|
|
default_code = 'verify_code_expired'
|
|
default_detail = _('The verification code has expired. Please resend it')
|
|
|
|
|
|
class CodeError(JMSException):
|
|
default_code = 'verify_code_error'
|
|
default_detail = _('The verification code is incorrect')
|
|
|
|
|
|
class CodeSendTooFrequently(JMSException):
|
|
default_code = 'code_send_too_frequently'
|
|
default_detail = _('Please wait {} seconds before sending')
|
|
|
|
def __init__(self, ttl):
|
|
super().__init__(detail=self.default_detail.format(ttl))
|