diff --git a/attract/manage.py b/attract/manage.py index 7ae84f6a..d13ced3f 100644 --- a/attract/manage.py +++ b/attract/manage.py @@ -249,7 +249,12 @@ def populate_node_types(old_ids={}): 'attachments': { 'type': 'list', 'schema': { - 'type': 'objectid' + 'type': 'objectid', + 'data_relation': { + 'resource': 'files', + 'field': '_id', + 'embeddable': True + } } } }, diff --git a/attract/settings.py b/attract/settings.py index effcd3ef..164b5006 100644 --- a/attract/settings.py +++ b/attract/settings.py @@ -73,6 +73,11 @@ nodes_schema = { 'user': { 'type': 'objectid', 'required': True, + 'data_relation': { + 'resource': 'users', + 'field': '_id', + 'embeddable': True + }, }, 'node_type': { 'type': 'objectid',