annotations

This commit is contained in:
j 2011-01-28 14:13:46 +05:30
parent d718308453
commit 45a0019316

View file

@ -4,6 +4,7 @@ from __future__ import division, with_statement
from django.db import models from django.db import models
from django.contrib.auth.models import User from django.contrib.auth.models import User
import ox
import utils import utils
@ -83,11 +84,12 @@ class Annotation(models.Model):
return { return {
'id': self.get_id(), 'id': self.get_id(),
'user': self.user.username, 'user': self.user.username,
'start': self.start, 'in': self.start,
'end': self.end, 'out': self.end,
'value': self.value, 'value': self.value,
'value_html': self.html(), 'value_html': self.html(),
'layer': self.layer.name 'created': self.created.strftime('%Y-%m-%dT%H:%M:%SZ'),
'modified': self.modified.strftime('%Y-%m-%dT%H:%M:%SZ')
} }
def __unicode__(self): def __unicode__(self):