add MailDomain.get_mailaddresses and mailaddresses property
This commit is contained in:
parent
e04132bd24
commit
8a84c9660a
1 changed files with 9 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue