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

@ -14,6 +14,7 @@ from ox.django import fields
import managers
from annotation.models import Annotation, get_matches
from item.models import Item
from changelog.models import Changelog
class Place(models.Model):
@ -119,3 +120,8 @@ class Place(models.Model):
#self.area= ox.location.area(self.south, self.west, self.north, self.east)
super(Place, self).save(*args, **kwargs)
def log(self):
c = Changelog(type='place')
c.value = self.json()
c.save()