# HG changeset patch # User rougeronj # Date 1432291057 -7200 # Node ID faf2cdb47813c0dd888713e767cd13ed4ea4dea2 # Parent 7faa531184576181959bfeb9b1daf5c27bf7a40f remove "comment" from the model. Copy the 'comment' field of Jamespot in the 'description' field of the model instead diff -r 7faa53118457 -r faf2cdb47813 server/ammico/models.py --- a/server/ammico/models.py Fri May 22 12:35:53 2015 +0200 +++ b/server/ammico/models.py Fri May 22 12:37:37 2015 +0200 @@ -24,7 +24,6 @@ idInventory = 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(default=datetime.datetime.now) favorite = models.BooleanField(default=False, db_index=True) diff -r 7faa53118457 -r faf2cdb47813 server/ammico/serializers.py --- a/server/ammico/serializers.py Fri May 22 12:35:53 2015 +0200 +++ b/server/ammico/serializers.py Fri May 22 12:37:37 2015 +0200 @@ -35,7 +35,7 @@ class Meta: model = Slide - fields = ('id', 'index', 'book', 'idStop', 'idInventory', 'title', 'description', 'comment', 'image', 'date', 'favorite', 'details') + fields = ('id', 'index', 'book', 'idStop', 'idInventory', 'title', 'description', 'image', 'date', 'favorite', 'details') def extractFromMIMO(slide): diff -r 7faa53118457 -r faf2cdb47813 server/ammico/views.py --- a/server/ammico/views.py Fri May 22 12:35:53 2015 +0200 +++ b/server/ammico/views.py Fri May 22 12:37:37 2015 +0200 @@ -52,15 +52,15 @@ if (step['stop'] != None and step['stop'] != ''): if 'comment' in step: - comment = step['comment'] + description = step['comment'] else: - comment = "" + description = "" Slide.objects.update_or_create( book=book, idStop=step['stop'], defaults={ - 'comment' : comment, + 'description' : description, 'date' : parse_datetime(str(datetime.strptime(step['DATE'] + " " + step['TIME'], "%d/%m/%Y %H:%M:%S"))) } )