All configuration via .env file. (This replaces the nopaque.env file)

This commit is contained in:
Patrick Jentsch
2020-06-09 12:46:08 +02:00
parent f32c6e9faa
commit 59003593b6
8 changed files with 89 additions and 109 deletions

View File

@ -47,10 +47,10 @@ def __create_mail_notifications(notification_service):
data.job.user.email)
subject_template = '[nopaque] Status update for your Job/Corpora: {title}!'
subject_template_values_dict = {'title': data.job.title}
protocol = os.environ.get('NOPAQUE_PROTOCOL')
domain = os.environ.get('NOPAQUE_DOMAIN')
url = '{domain}/{jobs}/{id}'.format(domain=domain,
jobs='jobs',
id=data.job.id)
url = '{protocol}://{domain}/{jobs}/{id}'.format(
protocol=protocol, domain=domain, jobs='jobs', id=data.job.id)
body_template_values_dict = {'username': data.job.user.username,
'id': data.job.id,
'title': data.job.title,