mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-05 07:14:08 +02:00
Display mailing list address on team page
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
from django.template.loader import render_to_string
|
||||
@ -41,6 +42,10 @@ class Team(models.Model):
|
||||
default=False,
|
||||
)
|
||||
|
||||
@property
|
||||
def email(self):
|
||||
return f"equipe-{self.trigram.lower()}@{os.getenv('SYMPA_HOST', 'localhost')}"
|
||||
|
||||
def create_mailing_list(self):
|
||||
get_sympa_client().create_list(
|
||||
f"equipe-{self.trigram.lower()}",
|
||||
|
Reference in New Issue
Block a user