diff options
author | Arun yadav <arunkumar5587@gmail.com> | 2012-05-19 15:15:51 +0530 |
---|---|---|
committer | Arun yadav <arunkumar5587@gmail.com> | 2012-05-19 15:15:51 +0530 |
commit | 244509e3eb4058a3aff505e3836d43d64b08fe7d (patch) | |
tree | 037e09c58dcc2add5a74d680106a76e48037883c /gstudio/models.py | |
parent | f43e836715ca5ed0a2a01efd5e4ade3d9dea9df7 (diff) | |
download | gnowsys-244509e3eb4058a3aff505e3836d43d64b08fe7d.tar.gz |
Difference generation between versions done partly, list of differences generated.
Diffstat (limited to 'gstudio/models.py')
-rw-r--r-- | gstudio/models.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gstudio/models.py b/gstudio/models.py index 2038334..2c9d51f 100644 --- a/gstudio/models.py +++ b/gstudio/models.py @@ -112,6 +112,7 @@ from reversion.models import Version from django.core import serializers from reversion.models import * from reversion.helpers import * +import ast NODETYPE_CHOICES = ( @@ -398,7 +399,9 @@ class NID(models.Model): # # predicate_id={"plural":"a1","altnames":"a2","contains_members":"a3","contains_subtypes":"a4","prior_nodes":"a5", "posterior_nodes":"a6"} # slist=self.get_ssid ver_dict=self.version_info(ssid) - + # ver_dict=str(ver['nbhood']) + # ver_dict=ast.literal_eval(ver_dict) + g_json = {} g_json["node_metadata"]= [] predicate_id = {} @@ -480,11 +483,13 @@ class Node(NID): def save(self, *args, **kwargs): + + # self.nbhood=self.get_nbh if GSTUDIO_VERSIONING: with reversion.create_revision(): super(Node, self).save(*args, **kwargs) # Call the "real" save() method. - super(Node, self).save(*args, **kwargs) # Call the "real" save() method. - + + super(Node, self).save(*args, **kwargs) # Call the "real" save() method. @@ -1651,13 +1656,13 @@ class Attributetype(Nodetype): def save(self, *args, **kwargs): self.nodemodel = self.__class__.__name__ - - if GSTUDIO_VERSIONING: + +# self.nbhood=self.get_nbh + if GSTUDIO_VERSIONING: with reversion.create_revision(): super(Attributetype, self).save(*args, **kwargs) # Call the "real" save() method. - super(Attributetype, self).save(*args, **kwargs) # Call the "real" save() method. - - + + super(Attributetype, self).save(*args, **kwargs) # Call the "real" save() method. class Relation(Edge): |