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 { | ||||
|             "title": self.title, | ||||
|             "speaker": self.speaker.name, | ||||
|             "speakers": ', '.join([x.name for x in self.speakers()]), | ||||
|             "kind": self.kind.name, | ||||
|         } | ||||
| 
 | ||||
|  |  | |||
|  | @ -309,9 +309,13 @@ class ResultNotification(models.Model): | |||
|     subject = models.CharField(max_length=100) | ||||
|     body = models.TextField() | ||||
| 
 | ||||
|     def recipients(self): | ||||
|         for speaker in self.proposal.speakers(): | ||||
|             yield speaker.email | ||||
| 
 | ||||
|     @property | ||||
|     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): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Patrick Altman
						Patrick Altman