From 35dfbd71a22168d33d1df0fc5bd92ae793a314f7 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 24 Apr 2015 12:43:25 +0200 Subject: [PATCH] Restored data_relation for nodes and node_types This allows us to make queries to nodes and get information about their parent. --- attract/settings.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/attract/settings.py b/attract/settings.py index 6f6e368a..9b9b1536 100644 --- a/attract/settings.py +++ b/attract/settings.py @@ -59,11 +59,11 @@ nodes_schema = { }, 'parent': { 'type': 'objectid', - #'default': '', - #'data_relation': { - # 'resource': 'nodes', - # 'field': '_id', - #}, + 'data_relation': { + 'resource': 'nodes', + 'field': '_id', + 'embeddable': True + }, }, 'user': { 'type': 'objectid', @@ -72,10 +72,11 @@ nodes_schema = { 'node_type': { 'type': 'objectid', 'required': True, - #'data_relation': { - # 'resource': 'node_types', - # 'field': '_id', - #}, + 'data_relation': { + 'resource': 'node_types', + 'field': '_id', + 'embeddable': True + }, }, 'properties': { 'type' : 'dict',