add proposal base to presentation
This commit is contained in:
parent
82754d2342
commit
5b7087f478
1 changed files with 11 additions and 5 deletions
|
@ -1,9 +1,10 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from symposion.conference.models import Section
|
|
||||||
|
|
||||||
from markitup.fields import MarkupField
|
from markitup.fields import MarkupField
|
||||||
|
|
||||||
|
from symposion.proposals.models import ProposalBase
|
||||||
|
from symposion.conference.models import Section
|
||||||
|
|
||||||
|
|
||||||
class Schedule(models.Model):
|
class Schedule(models.Model):
|
||||||
|
|
||||||
|
@ -60,15 +61,20 @@ class SlotRoom(models.Model):
|
||||||
class Presentation(models.Model):
|
class Presentation(models.Model):
|
||||||
|
|
||||||
slot = models.OneToOneField(Slot, null=True, blank=True, related_name="presentation")
|
slot = models.OneToOneField(Slot, null=True, blank=True, related_name="presentation")
|
||||||
|
|
||||||
title = models.CharField(max_length=100)
|
title = models.CharField(max_length=100)
|
||||||
description = models.MarkupField()
|
description = models.MarkupField()
|
||||||
abstract = models.MarkupField()
|
abstract = models.MarkupField()
|
||||||
|
|
||||||
speaker = models.ForeignKey("speakers.Speaker", related_name="presentations")
|
speaker = models.ForeignKey("speakers.Speaker", related_name="presentations")
|
||||||
additional_speakers = models.ManyToManyField("speakers.Speaker", blank=True)
|
additional_speakers = models.ManyToManyField("speakers.Speaker", blank=True)
|
||||||
|
|
||||||
cancelled = models.BooleanField(default=False)
|
cancelled = models.BooleanField(default=False)
|
||||||
|
_proposal = models.ForeignKey(ProposalBase, related_name="presentation")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def proposal(self):
|
||||||
|
if self._proposal:
|
||||||
|
proposal = ProposalBase.objects.get_subclass(pk=self._proposal.pk)
|
||||||
|
return proposal
|
||||||
|
return None
|
||||||
|
|
||||||
def speakers(self):
|
def speakers(self):
|
||||||
yield self.speaker
|
yield self.speaker
|
||||||
|
|
Loading…
Reference in a new issue