mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-12 17:12:25 +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
|
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||||
ACCOUNT_LOGIN_METHODS = {"{{cookiecutter.username_type}}"}
|
ACCOUNT_LOGIN_METHODS = {"{{cookiecutter.username_type}}"}
|
||||||
# https://docs.allauth.org/en/latest/account/configuration.html
|
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||||
ACCOUNT_EMAIL_REQUIRED = True
|
{%- if cookiecutter.username_type == "username" %}
|
||||||
{%- if cookiecutter.username_type == "email" %}
|
ACCOUNT_SIGNUP_FIELDS = ["email*", "username*", "password1*", "password2*"]
|
||||||
# https://docs.allauth.org/en/latest/account/configuration.html
|
{%- else %}
|
||||||
ACCOUNT_USERNAME_REQUIRED = False
|
ACCOUNT_SIGNUP_FIELDS = ["email*", "password1*", "password2*"]
|
||||||
# https://docs.allauth.org/en/latest/account/configuration.html
|
# https://docs.allauth.org/en/latest/account/configuration.html
|
||||||
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
|
ACCOUNT_USER_MODEL_USERNAME_FIELD = None
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user