add MailDomain.get_mailaddresses and mailaddresses property

This commit is contained in:
Jan Dittberner 2015-01-24 21:01:37 +01:00
parent e04132bd24
commit 8a84c9660a

View file

@ -45,6 +45,15 @@ class MailDomain(DomainBase):
def __str__(self):
return self.domain
def get_mailaddresses(self):
"""
Get a list of mail addresses assigned to this mail domain.
"""
return self.mailaddress_set.all()
mailaddresses = property(get_mailaddresses)
@python_2_unicode_compatible
class HostingDomain(DomainBase):