diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 22876096c..ba0a7ce46 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -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 %}