probar Email Verification
This commit is contained in:
@@ -15,7 +15,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
SECRET_KEY = os.getenv("adminAS_KEY")
|
SECRET_KEY = os.getenv("adminAS_KEY")
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = False
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
# Application definition
|
# Application definition
|
||||||
@@ -25,12 +25,15 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
|
#'django.contrib.sites',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'rest_framework.authtoken',
|
'rest_framework.authtoken',
|
||||||
|
|
||||||
'allauth',
|
'allauth',
|
||||||
'allauth.account',
|
'allauth.account',
|
||||||
'allauth.socialaccount',
|
'allauth.socialaccount',
|
||||||
|
|
||||||
'widget_tweaks',
|
'widget_tweaks',
|
||||||
|
|
||||||
'Clientes',
|
'Clientes',
|
||||||
@@ -61,11 +64,11 @@ TEMPLATES = [
|
|||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
'django.template.context_processors.debug',
|
'django.template.context_processors.debug',
|
||||||
# `allauth` needs this from django
|
|
||||||
'django.template.context_processors.request',
|
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
|
# `allauth` needs this from django
|
||||||
|
'django.template.context_processors.request',
|
||||||
#custom context processor
|
#custom context processor
|
||||||
'Clientes.saldo_context_proc.get_saldo',
|
'Clientes.saldo_context_proc.get_saldo',
|
||||||
],
|
],
|
||||||
@@ -96,10 +99,10 @@ LOGIN_REDIRECT_URL = '/'
|
|||||||
ACCOUNT_LOGOUT_REDIRECT_URL = '/accounts/login/'
|
ACCOUNT_LOGOUT_REDIRECT_URL = '/accounts/login/'
|
||||||
ACCOUNT_SIGNUP_REDIRECT_URL =LOGIN_REDIRECT_URL
|
ACCOUNT_SIGNUP_REDIRECT_URL =LOGIN_REDIRECT_URL
|
||||||
ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE = True
|
ACCOUNT_LOGOUT_ON_PASSWORD_CHANGE = True
|
||||||
|
#for email auth
|
||||||
|
ACCOUNT_EMAIL_REQUIRED =True
|
||||||
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
|
||||||
|
|
||||||
|
|
||||||
EMAIL_TIMEOUT = 10
|
EMAIL_TIMEOUT = 10
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
EMAIL_SUBJECT_PREFIX = 'AS Timbres'
|
EMAIL_SUBJECT_PREFIX = 'AS Timbres'
|
||||||
@@ -119,6 +122,7 @@ else:
|
|||||||
EMAIL_USE_SSL=True
|
EMAIL_USE_SSL=True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user