在 django-allauth 中禁用电子邮件管理
Disable email management in django-allauth
我正在使用 django-allauth
并想知道禁用电子邮件管理的正确方法™️ 是什么。一些上下文:帐户是代表用户创建的,他们应该坚持使用他们的(机构)电子邮件地址。
我应该覆盖模板并从 allauth.urls
中删除 accounts/email
还是有更优雅的方法?
来自 allauth:
ACCOUNT_EMAIL_VERIFICATION (="mandatory" | "optional" | "none")
Determines the e-mail verification method during signup. 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.
您可能想在 settings.py
中设置 ACCOUNT_EMAIL_VERIFICATION = "none"
。如果你想完全禁用用户添加多个电子邮件地址的功能,你可能需要覆盖 accounts/email
模板,你也可以覆盖 urls.py
中的 url 以使用不同的查看。
我正在使用 django-allauth
并想知道禁用电子邮件管理的正确方法™️ 是什么。一些上下文:帐户是代表用户创建的,他们应该坚持使用他们的(机构)电子邮件地址。
我应该覆盖模板并从 allauth.urls
中删除 accounts/email
还是有更优雅的方法?
来自 allauth:
ACCOUNT_EMAIL_VERIFICATION (="mandatory" | "optional" | "none") Determines the e-mail verification method during signup. 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.
您可能想在 settings.py
中设置 ACCOUNT_EMAIL_VERIFICATION = "none"
。如果你想完全禁用用户添加多个电子邮件地址的功能,你可能需要覆盖 accounts/email
模板,你也可以覆盖 urls.py
中的 url 以使用不同的查看。