Changeset - 5b0354be90ea
[Not reviewed]
0 1 0
Luke Hatcher - 12 years ago 2012-08-31 06:52:12
lukeman@gmail.com
add id and speaker to presentation
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
symposion/schedule/models.py
Show inline comments
...
 
@@ -62,25 +62,25 @@ class Presentation(models.Model):
 
    
 
    slot = models.OneToOneField(Slot, null=True, blank=True, related_name="presentation")
 
    title = models.CharField(max_length=100)
 
    description = MarkupField()
 
    abstract = MarkupField()
 
    speaker = models.ForeignKey("speakers.Speaker", related_name="presentations")
 
    additional_speakers = models.ManyToManyField("speakers.Speaker", blank=True)
 
    cancelled = models.BooleanField(default=False)
 
    _proposal = models.OneToOneField(ProposalBase, related_name="presentation")
 
    section = models.ForeignKey(Section, related_name="presentations")
 
    
 
    @property
 
    def proposal(self):
 
        if self._proposal:
 
            proposal = ProposalBase.objects.get_subclass(pk=self._proposal.pk)
 
            return proposal
 
        return None
 
    
 
    def speakers(self):
 
        yield self.speaker
 
        for speaker in self.additional_speakers.all():
 
            yield speaker
 
    
 
    def __unicode__(self):
 
        return self.title
 
        return "#%s %s (%s)" % (self.id, self.title, self.speaker)
0 comments (0 inline, 0 general)