Я использую Django Allauth v0.36, и форма регистрации создаст учетную запись, даже если форма недействительна.Он не перенаправляет и не регистрирует пользователя, когда он является недопустимой формой, он остается на странице регистрации и показывает сообщение от недействительного.Когда я пытаюсь зарегистрироваться с теми же учетными данными, он говорит, что учетная запись уже существует, база данных показывает созданную учетную запись.
Есть идеи, почему это происходит?
Вот список моих настроек:
ACCOUNT_ADAPTER = 'allauth.account.adapter.DefaultAccountAdapter'
#ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS = True # By changing this setting to False, logged in users will not be redirected when they access login/signup pages.
ACCOUNT_AUTHENTICATION_METHOD = 'username_email' # User can login with username or email
ACCOUNT_USERNAME_REQUIRED = False # TODO: What about HOS Users??
ACCOUNT_CONFIRM_EMAIL_ON_GET = False
ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL = LOGIN_URL
ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL = '/'
ACCOUNT_EMAIL_CONFIRMATION_COOLDOWN = 180
ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 1
# Determines the expiration date of email confirmation mails (# of days).
ACCOUNT_EMAIL_CONFIRMATION_HMAC = True
# In order to verify an email address a key is mailed identifying the email address to be verified. In previous versions, a record was stored in the database for each ongoing email confirmation, keeping track of these keys. Current versions use HMAC based keys that do not require server side state.
ACCOUNT_EMAIL_REQUIRED = True
# Determines the e-mail verification method during signup – choose one of "mandatory", "optional", or "none". When set to “mandatory” the user is blocked from logging in until the email address is verified. Choose “optional” or “none” to allow logins with an unverified e-mail address. In case of “optional”, the e-mail verification mail is still sent, whereas in case of “none” no e-mail verification mails are sent.
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
# Determines the e-mail verification method during signup – choose one of "mandatory", "optional", or "none". When set to “mandatory” the user is blocked from logging in until the email address is verified. Choose “optional” or “none” to allow logins with an unverified e-mail address. In case of “optional”, the e-mail verification mail is still sent, whereas in case of “none” no e-mail verification mails are sent.
ACCOUNT_EMAIL_SUBJECT_PREFIX ='Mod Technologies LLC '
# Subject-line prefix to use for email messages sent. By default, the name of the current Site (django.contrib.sites) is used.
ACCOUNT_DEFAULT_HTTP_PROTOCOL ='http'
# Security
ACCOUNT_LOGIN_ATTEMPTS_LIMIT = 5
ACCOUNT_LOGIN_ATTEMPTS_TIMEOUT = 86400
ACCOUNT_LOGOUT_ON_GET = False
ACCOUNT_LOGOUT_REDIRECT_URL ='/'
ACCOUNT_SIGNUP_FORM_CLASS = None #Custom Content -> 'users.forms.SignupForm'
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_USER_MODEL_EMAIL_FIELD ='email'
ACCOUNT_USER_MODEL_USERNAME_FIELD ='username'
ACCOUNT_USERNAME_MIN_LENGTH = 5
ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True # The default behaviour is not log users in and to redirect them to ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL
#By changing this setting to True, users will automatically be logged in once they confirm their email address. Note however that this only works when confirming the email address immediately after signing up, assuming users didn’t close their browser or used some sort of private browsing mode.