diff options
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 |