ADD: dav_event_office: added some more information to participant list.

This commit is contained in:
2019-07-09 11:27:06 +02:00
parent c62eba67f6
commit db9aebf911
5 changed files with 30 additions and 6 deletions

View File

@@ -65,6 +65,25 @@ class Participant(models.Model):
def get_full_name(self):
return '{} {}'.format(self.personal_names, self.family_names)
def get_info(self):
text = """{fullname}
{address}, {postal_code} {city}
Notfallkontakt:
{emergency_contact}
Anmerkung:
{note}
"""
return text.format(
fullname=self.get_full_name(),
address=self.address,
postal_code=self.postal_code,
city=self.city,
emergency_contact=self.emergency_contact,
note=self.note,
)
def save(self, **kwargs):
if not self.purge_at and self.event:
self.purge_at = self.__class__.calc_purge_at(self.event)