--- a/server/ammico/models.py Fri Mar 20 11:31:44 2015 +0100
+++ b/server/ammico/models.py Fri Mar 20 11:32:02 2015 +0100
@@ -24,9 +24,15 @@
class Slide(models.Model):
book = models.ForeignKey(Book, related_name = "slides")
idStop = models.CharField(max_length=512, blank=False)
- comment = models.CharField(max_length=512, blank=True)
+ title = models.CharField(max_length=512, blank=True)
+ description = models.CharField(max_length=1024, blank=True)
+ comment = models.CharField(max_length=2048, blank=True)
+ image = models.URLField(max_length=2048, blank=True)
date = models.DateTimeField(blank=True)
favorite = models.BooleanField(default=False, db_index=True)
def __str__(self):
- return self.idStop
\ No newline at end of file
+ return self.idStop
+
+ class Meta:
+ order_with_respect_to = 'book'
\ No newline at end of file
--- a/server/ammico/serializers.py Fri Mar 20 11:31:44 2015 +0100
+++ b/server/ammico/serializers.py Fri Mar 20 11:32:02 2015 +0100
@@ -21,4 +21,4 @@
class Meta:
model = Slide
- fields = ('id', 'book', 'idStop', 'comment', 'date', 'favorite', 'details')
\ No newline at end of file
+ fields = ('id', 'book', 'idStop', 'title', 'description', 'comment', 'image', 'date', 'favorite', 'details')
\ No newline at end of file