diff options
author | Arun yadav <arunkumar5587@gmail.com> | 2012-05-10 14:25:23 +0530 |
---|---|---|
committer | Arun yadav <arunkumar5587@gmail.com> | 2012-05-10 14:25:23 +0530 |
commit | 4d4df37a9f858d5fc2dc342d06d30b87031000d8 (patch) | |
tree | 13cbe361fe5636596cb1dbce9c0206d463399383 /gstudio/models.py | |
parent | fe4a82b80954e4a4666afa71ab3161c8b824f9e9 (diff) | |
parent | b06db59efba106edb115598f822887143e729d33 (diff) | |
download | gnowsys-4d4df37a9f858d5fc2dc342d06d30b87031000d8.tar.gz |
Merge remote-tracking branch 'gn/master'
Diffstat (limited to 'gstudio/models.py')
-rw-r--r-- | gstudio/models.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gstudio/models.py b/gstudio/models.py index 5129716..8177cef 100644 --- a/gstudio/models.py +++ b/gstudio/models.py @@ -816,7 +816,8 @@ class Nodetype(Node): g_json = {} g_json["node_metadata"]= [] g_json["relations"]=[] - + g_json["relset"]=[] + global counter global attr_counter nbh = self.get_nbh @@ -831,7 +832,8 @@ class Nodetype(Node): this_node = {"_id":str(self.id),"title":self.title,"screen_name":self.title, "url":self.get_absolute_url(),"expanded":"true"} - g_json["node_metadata"].append(this_node) + g_json["node_metadata"].append(this_node) + g_json["relset"].append(self.id) for key in predicate_id.keys(): if nbh[key]: @@ -851,6 +853,8 @@ class Nodetype(Node): # create nodes g_json["node_metadata"].append({"_id":str(item.id),"screen_name":item.title,"title":self.title, "url":item.get_absolute_url(),"expanded":"false"}) + g_json["relset"].append(item.id) + # g_json[str(key)].append({"from":predicate_id[key] , "to":item.id ,"value":1 }) #create links |