From be179e8f6493e78badf48cc122e3a4f79e6365ae Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Wed, 10 Oct 2018 11:35:42 -0400 Subject: [PATCH] settings: Make ACCOUNT_EMAIL_CONFIRMATION_REQUIRED configurable. --- pinaxcon/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index c1aed7b..ae6999e 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -304,8 +304,10 @@ LOGIN_URL = "nbpy_login" # We need to explicitly switch on signups. ACCOUNT_OPEN_SIGNUP = bool(int(os.environ.get("DJANGO_ACCOUNT_OPEN_SIGNUP", "0"))) ACCOUNT_EMAIL_UNIQUE = True -#ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False if DEBUG else True -ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False +ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = bool(int(os.environ.get( + 'DJANGO_ACCOUNT_CONFIRM_EMAIL', + False if DEBUG else True, +))) ACCOUNT_LOGIN_REDIRECT_URL = "dashboard" ACCOUNT_LOGOUT_REDIRECT_URL = "home" ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2