我从django allauth得到这个,用于唯一用户名检查。你知道吗
%(model_name)s with this %(field_label)s already exists.
联机快速搜索显示电子邮件错误已解决,可以用以下内容覆盖:
from django.utils.translation import ugettext_lazy as _
from allauth.account.adapter import DefaultAccountAdapter
class CustomAccountAdapter(DefaultAccountAdapter):
# Overrides default adapter
def __init__(self, request=None):
super(CustomAccountAdapter, self).__init__(request)
self.error_messages['email_taken'] = _('A user is already registered with this e-mail address.')
但是,以这种方式重写适配器对username不起作用。谁能帮我一下吗,这是唯一阻止我现在直播的东西。。。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐