ADD: dav_event_office: added some more information to participant list.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user