http://neomodel.readthedocs.org/en/latest/getting_started.html#connectingに従おうとしているときにとんでもないエラーが発生しました
名前が StringProperty であるため、この環境から neo4django をアンインストールしました。neo4j のクラスを作成しようとしています。
In [8]: from neomodel import StringProperty as SP
In [9]: class Person(StructuredNode):
...: name = SP()
...:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/home/cchilders/.local/virtualenv/another_neo4django_attempt/local/lib/python2.7/site-packages/django/core/management/commands/shell.pyc in <module>()
----> 1 class Person(StructuredNode):
2 name = SP()
3
/home/cchilders/.local/virtualenv/another_neo4django_attempt/local/lib/python2.7/site-packages/django/core/management/commands/shell.pyc in Person()
1 class Person(StructuredNode):
----> 2 name = SP()
3
NameError: name 'SP' is not defined
In [10]: S
%%SVG StopIteration SyntaxError SystemExit
SP StringProperty SyntaxWarning
StandardError StructuredNode SystemError
ご覧のとおり、オートコンプリートは名前がそこにあることを証明します。これはネオモデル固有のものですか、それとも存在する名前が未定義になる一般的な Python の理由はありますか? ありがとうございました