keep a log of changes

This commit is contained in:
j 2012-01-31 22:36:10 +05:30
commit 82c83c1309
12 changed files with 61 additions and 3 deletions

View file

@ -11,6 +11,7 @@ import ox
from archive import extract
from clip.models import Clip
from changelog.models import Changelog
from item.utils import sort_string
import managers
@ -202,6 +203,11 @@ class Annotation(models.Model):
j['videoRatio'] = streams[0].aspect_ratio
return j
def log(self):
c = Changelog(type='annotation')
c.value = self.json()
c.save()
def __unicode__(self):
return u"%s %s-%s" %(self.public_id, self.start, self.end)