# HG changeset patch # User cavaliet # Date 1351261950 -7200 # Node ID 50d333d9054174c012b4ea0bf35a114f7c993f5a # Parent 8fd46e270e23365c53c8544d604a4359157b7ab0 Update annotation put api format with title and description. (and remove useless import) diff -r 8fd46e270e23 -r 50d333d90541 src/ldt/ldt/api/ldt/resources/annotation.py --- a/src/ldt/ldt/api/ldt/resources/annotation.py Fri Oct 26 16:17:08 2012 +0200 +++ b/src/ldt/ldt/api/ldt/resources/annotation.py Fri Oct 26 16:32:30 2012 +0200 @@ -18,7 +18,7 @@ media = "" begin = "" end = "" - content = {"data":""} + content = {"title":"", "description":""} tags = [] meta = {"creator":"","created":""} @@ -85,7 +85,8 @@ meta = a['meta'] author = meta['creator'] date = meta['created'] - type_id, new_id = adder.add(a['media'], a['type'], a['type_title'], a['content']['data'], '', a['tags'], begin, dur, author, date, None, "2194379", audio_src, audio_href) + # add(media, cutting_id, cutting_title, title, text, tags_list, begin, dur, author, date + type_id, new_id = adder.add(a['media'], a['type'], a['type_title'], a['content']['title'], a['content']['description'], a['tags'], begin, dur, author, date, None, "2194379", audio_src, audio_href) if not new_id: protect_models() raise BadRequest diff -r 8fd46e270e23 -r 50d333d90541 src/ldt/ldt/ldt_utils/segmentserializer.py --- a/src/ldt/ldt/ldt_utils/segmentserializer.py Fri Oct 26 16:17:08 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/segmentserializer.py Fri Oct 26 16:32:30 2012 +0200 @@ -5,7 +5,6 @@ from tagging.utils import parse_tag_input import lxml.etree import uuid -import logging DATE_FORMATS = ["%d/%m/%Y", "%Y-%m-%d"]