From 09c16ab2ae04d9407fec353e033cb446773399ed Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Wed, 22 Jan 2020 13:03:23 +0100 Subject: [PATCH] Set mailtrain URL. --- musician/models.py | 7 ++++--- musician/templates/musician/mailinglists.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/musician/models.py b/musician/models.py index aa3ebd4..44bc731 100644 --- a/musician/models.py +++ b/musician/models.py @@ -5,6 +5,8 @@ from django.utils.dateparse import parse_datetime from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ +from . import settings as musician_settings + logger = logging.getLogger(__name__) @@ -249,9 +251,8 @@ class MailinglistService(OrchestraModel): return "{}@{}".format(self.data['address_name'], self.data['address_domain']['name']) @property - def configure(self): - # TODO(@slamora): build mailtran absolute URL - return format_html('Mailtrain') + def manager_url(self): + return musician_settings.URL_MAILTRAIN class SaasService(OrchestraModel): diff --git a/musician/templates/musician/mailinglists.html b/musician/templates/musician/mailinglists.html index 22a1b87..d02f4b7 100644 --- a/musician/templates/musician/mailinglists.html +++ b/musician/templates/musician/mailinglists.html @@ -37,7 +37,7 @@ {% endif %} {{ resource.address_name}} {{ resource.admin_email }} - Mailtrain + Mailtrain {% endfor %}