@@ -49,17 +49,23 @@ class Slot(models.Model):
def assign(self, content):
"""
Assign the given content to this slot and if a previous slot content
was given we need to unlink it to avoid integrity errors.
self.unassign()
content.slot = self
content.save()
def unassign(self):
Unassign the associated content with this slot.
if self.content and self.content.slot_id:
self.content.slot = None
self.content.save()
@property
def content(self):
Return the content this slot represents.
@@@ hard-coded for presentation for now