mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-04-11 12:24:13 +03:00
Update django-allauth setting
This commit is contained in:
parent
2ea12f6b0e
commit
df820b42bd
|
@ -337,10 +337,10 @@ ACCOUNT_ALLOW_REGISTRATION = env.bool("DJANGO_ACCOUNT_ALLOW_REGISTRATION", True)
|
|||
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||
ACCOUNT_LOGIN_METHODS = {"{{cookiecutter.username_type}}"}
|
||||
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||
ACCOUNT_EMAIL_REQUIRED = True
|
||||
{%- if cookiecutter.username_type == "email" %}
|
||||
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||
ACCOUNT_USERNAME_REQUIRED = False
|
||||
{%- if cookiecutter.username_type == "username" %}
|
||||
ACCOUNT_SIGNUP_FIELDS = ["email*", "username*", "password1*", "password2*"]
|
||||
{%- else %}
|
||||
ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*", "password2*"]
|
||||
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user