Example #1
0
class PostImage(Cloneable):
    post = fields.FKToVersion(Post)
    caption = models.CharField(max_length=255, blank=True)
    order = OrderField()

    def __unicode__(self):
        if self.caption:
            return self.caption
        else:
            return unicode(self.image)
Example #2
0
class Review(Cloneable):
    book = fields.FKToVersion(Book)
    text = models.CharField(max_length=255)

    def __unicode__(self):
        return self.text
Example #3
0
class AbstractM2MBook(models.Model):
    books = fields.M2MFromVersion('Book', blank=True)
    cartoon = fields.FKToVersion('Cartoon', blank=True, null=True)

    class Meta:
        abstract = True