subtitles should annotations part 1
This commit is contained in:
parent
e1ef4a33d8
commit
f4e0aa7cf6
3 changed files with 19 additions and 3 deletions
|
|
@ -101,8 +101,8 @@ class Annotation(models.Model):
|
|||
def get_id(self):
|
||||
return ox.to32(self.id)
|
||||
|
||||
def json(self):
|
||||
return {
|
||||
def json(self, layer=False):
|
||||
j = {
|
||||
'id': self.get_id(),
|
||||
'user': self.user.username,
|
||||
'in': self.start,
|
||||
|
|
@ -111,6 +111,9 @@ class Annotation(models.Model):
|
|||
'created': self.created,
|
||||
'modified': self.modified
|
||||
}
|
||||
if layer:
|
||||
j['layer'] = self.layer.name
|
||||
return j
|
||||
|
||||
def __unicode__(self):
|
||||
return u"%s/%s-%s" %(self.item, self.start, self.end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue