Fixed email activation

This commit is contained in:
Keannu Bernasol 2023-11-19 18:58:41 +08:00
parent 0d2721434a
commit 6f95978946

View file

@ -29,7 +29,6 @@ SECRET_KEY = str(os.getenv('SECRET_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 = True
FRONTEND_DEBUG = True
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
# CSRF_TRUSTED_ORIGINS = [] To-do: Specify URL to web frontend # CSRF_TRUSTED_ORIGINS = [] To-do: Specify URL to web frontend
@ -163,9 +162,6 @@ AUTH_USER_MODEL = 'accounts.CustomUser'
DJOSER = { DJOSER = {
'SEND_ACTIVATION_EMAIL': True, 'SEND_ACTIVATION_EMAIL': True,
'SEND_CONFIRMATION_EMAIL': True, 'SEND_CONFIRMATION_EMAIL': True,
'EMAIL': {
'activation': 'config.email.ActivationEmail'
},
'ACTIVATION_URL': 'activation/{uid}/{token}', 'ACTIVATION_URL': 'activation/{uid}/{token}',
'USER_AUTHENTICATION_RULES': ['djoser.authentication.TokenAuthenticationRule'], 'USER_AUTHENTICATION_RULES': ['djoser.authentication.TokenAuthenticationRule'],
'SERIALIZERS': { 'SERIALIZERS': {
@ -211,11 +207,7 @@ USE_TZ = True
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DOMAIN = '' DOMAIN = 'CITC-Tracker.keannu1.duckdns.org'
if (FRONTEND_DEBUG):
DOMAIN = 'exp'
else:
DOMAIN = 'citctracker'
SITE_NAME = 'CITC Equipment Tracker' SITE_NAME = 'CITC Equipment Tracker'