Python 如何使用Django设置OrientDB PyOrient OGM?
我在连接Django和Orientdb PyaOrient OGM时遇到困难 我在Django的settings.py文件中设置了以下连接字符串和初始化方法Python 如何使用Django设置OrientDB PyOrient OGM?,python,django,django-models,orientdb,pyorient,Python,Django,Django Models,Orientdb,Pyorient,我在连接Django和Orientdb PyaOrient OGM时遇到困难 我在Django的settings.py文件中设置了以下连接字符串和初始化方法 # PYORIENT DB SETTINGS DJANGORIENT_SETTINGS = { 'host': 'localhost', 'port': '2480', 'username': 'xxxx', 'password': 'xxxxxxxxxx', 'name': 'authdb' }
# PYORIENT DB SETTINGS
DJANGORIENT_SETTINGS = {
'host': 'localhost',
'port': '2480',
'username': 'xxxx',
'password': 'xxxxxxxxxx',
'name': 'authdb'
}
from pyorient.ogm import declarative
Node = declarative.declarative_node()
Relationship = declarative.declarative_relationship()
但是我无法通过models.py文件连接到数据库
from pyorient.ogm.property import *
from .settings import Node
class Car(Node):
registration = String(unique=True)
colour = String()
关于如何连接这两种技术有什么建议吗?Hi@Tommyk,您使用的是哪个版本的OrientDB和Django?您尝试过其中任何一种吗?