Set mailtrain URL.

This commit is contained in:
Santiago Lamora 2020-01-22 13:03:23 +01:00
parent f023cb21c7
commit 09c16ab2ae
2 changed files with 5 additions and 4 deletions

View File

@ -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('<a href="#TODO">Mailtrain</a>')
def manager_url(self):
return musician_settings.URL_MAILTRAIN
class SaasService(OrchestraModel):

View File

@ -37,7 +37,7 @@
{% endif %}
<td>{{ resource.address_name}}</td>
<td>{{ resource.admin_email }}</td>
<td><a href="#TODO-{{ resource.manager_url }}" target="_blank" rel="noopener noreferrer">Mailtrain</a></td>
<td><a href="{{ resource.manager_url }}" target="_blank" rel="noopener noreferrer">Mailtrain</a></td>
</tr>
{% endfor %}
</tbody>