from neomodel import (config, StructuredNode, StringProperty, IntegerProperty,
UniqueIdProperty, JSONProperty, RelationshipTo, RelationshipFrom)
config.DATABASE_URL = 'bolt://neo4j:password@localhost:7687/database' # default
class Category(StructuredNode):
name = StringProperty(unique_index=True, required=True)
date = JSONProperty(default={})
child_category = RelationshipFrom('Category', 'IS_CHILD')
parent_category = RelationshipFrom('Category', 'IS_PARENT')
class Page(StructuredNode):
uid = UniqueIdProperty()
name = StringProperty(unique_index=True)
date = JSONProperty(default={})
child = RelationshipFrom('Category', 'IS_CHILD')
preceeds = RelationshipFrom('Page', 'PRECEEDS')
linked = RelationshipFrom('Page', 'LINKED')
I used the neomodel_install_labels to create these labels, and I can see that they are in fact in the database. I then try to import those classes into another file and make a node:
I made a python file that defines two classes:
I used the neomodel_install_labels to create these labels, and I can see that they are in fact in the database. I then try to import those classes into another file and make a node:
Which fails with the following error:
This error occurs in the line where I import Category and Page from the techtreemodel.py file. What am I doing wrong here?