Merge pull request #81 from miurahr/multiple-speakers
Multiple speakers
This commit is contained in:
commit
2aa805a01d
2 changed files with 6 additions and 1 deletions
|
@ -135,6 +135,7 @@ class ProposalBase(models.Model):
|
||||||
return {
|
return {
|
||||||
"title": self.title,
|
"title": self.title,
|
||||||
"speaker": self.speaker.name,
|
"speaker": self.speaker.name,
|
||||||
|
"speakers": ', '.join([x.name for x in self.speakers()]),
|
||||||
"kind": self.kind.name,
|
"kind": self.kind.name,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -309,9 +309,13 @@ class ResultNotification(models.Model):
|
||||||
subject = models.CharField(max_length=100)
|
subject = models.CharField(max_length=100)
|
||||||
body = models.TextField()
|
body = models.TextField()
|
||||||
|
|
||||||
|
def recipients(self):
|
||||||
|
for speaker in self.proposal.speakers():
|
||||||
|
yield speaker.email
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def email_args(self):
|
def email_args(self):
|
||||||
return (self.subject, self.body, self.from_address, [self.to_address])
|
return (self.subject, self.body, self.from_address, self.recipients())
|
||||||
|
|
||||||
|
|
||||||
def promote_proposal(proposal):
|
def promote_proposal(proposal):
|
||||||
|
|
Loading…
Reference in a new issue