Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Use correct setting name

Roland Geider821a2f4ae62e
diff --git a/settings/settings_global.py b/settings/settings_global.py
index f45c81f22..cf65df01e 100644
--- a/settings/settings_global.py
+++ b/settings/settings_global.py
@@ -219,7 +219,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# django-allauth
#
ACCOUNT_CONFIRM_EMAIL_ON_GET = True
-EMAIL_CONFIRMATION_EXPIRE_DAYS = 2
+ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2
ACCOUNT_ADAPTER = 'wger.core.account_adapter.WgerAccountAdapter'
#
diff --git a/wger/core/account_adapter.py b/wger/core/account_adapter.py
index 5ba9b7c39..fdb6554a2 100644
--- a/wger/core/account_adapter.py
+++ b/wger/core/account_adapter.py
@@ -16,10 +16,10 @@
from datetime import timedelta
# Django
+from django.conf import settings
from django.utils import timezone
# Third Party
-from allauth.account import app_settings
from allauth.account.adapter import DefaultAccountAdapter
@@ -36,7 +36,7 @@ class WgerAccountAdapter(DefaultAccountAdapter):
which needs this information.
"""
- expire_days = app_settings.EMAIL_CONFIRMATION_EXPIRE_DAYS
+ expire_days = settings.ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS
context['expire_hours'] = expire_days * 24
context['expire_date'] = timezone.now() + timedelta(days=expire_days)
super().send_mail(template_prefix, email, context)