mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 19:22:51 +02:00
Teams must send their motivation letter
This commit is contained in:
@ -20,6 +20,10 @@ from tfjm.lists import get_sympa_client
|
||||
from tfjm.matrix import Matrix, RoomPreset, RoomVisibility
|
||||
|
||||
|
||||
def get_motivation_letter_filename(instance, filename):
|
||||
return f"authorization/motivation_letters/motivation_letter_{instance.trigram}"
|
||||
|
||||
|
||||
class Team(models.Model):
|
||||
"""
|
||||
The Team model represents a real team that participates to the TFJM².
|
||||
@ -45,6 +49,13 @@ class Team(models.Model):
|
||||
help_text=_("The access code let other people to join the team."),
|
||||
)
|
||||
|
||||
motivation_letter = models.FileField(
|
||||
verbose_name=_("motivation letter"),
|
||||
upload_to=get_motivation_letter_filename,
|
||||
blank=True,
|
||||
default="",
|
||||
)
|
||||
|
||||
@property
|
||||
def students(self):
|
||||
return self.participants.filter(studentregistration__isnull=False)
|
||||
|
Reference in New Issue
Block a user