diff --git a/dal/settings.py b/dal/settings.py index 137c914..b1210b1 100644 --- a/dal/settings.py +++ b/dal/settings.py @@ -48,6 +48,8 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUG = config('DEBUG', default=False, cast=bool) +EMAIL_FROM_ADDRESS = config('EMAIL_FROM_ADDRESS') + ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv()) INSTALLED_APPS = [ diff --git a/dal/views.py b/dal/views.py index f697c90..2ea6dfb 100644 --- a/dal/views.py +++ b/dal/views.py @@ -197,7 +197,7 @@ class ResetPassword(View): # getting epoch for the time now in UTC to spare us headache with timezones creationtime = int(datetime.utcnow().timestamp()) # Construct the data for the email - email_from = 'Userservice at ungleich <%s>' % config['EMAIL']['EMAILFROM'] + email_from = settings.EMAIL_FROM_ADDRESS to = ['%s <%s>' % (user, email)] subject = 'Password reset request for %s' % user link = self.build_reset_link(user, creationtime)