我試圖在Apache
服務器上託管的django
網站上使用neo4j
數據庫。我正在使用neo4django
。我遵循http://neo4django.readthedocs.org/en/v0.1.8/index.html中的說明。創建一個節點時,我得到以下錯誤:在apache上使用neo4django
error at /disk/ [Errno 111] Connection refused Request
我的models.py:
import django.db
from neo4django.db import models
class Person(django.db.models.Model):
name = django.db.models.CharField(max_length=50, null=True, blank=True)
username = django.db.models.CharField(max_length=50, null=True, blank=True)
password=django.db.models.CharField(max_length=50, null=True, blank=True)
email=django.db.models.CharField(max_length=50, null=True, blank=True)
class Meta:
db_table='lt_profile'
class Pnode(models.NodeModel):
name=models.StringProperty()
#more fields
class Anode(models.NodeModel):
art_type=models.StringProperty(max_length=50)
mtime=models.StringProperty(max_length=200)
#relation:
我的settings.py:
NEO4J_DATABASES = {
'default' : {
'HOST':'localhost',
'PORT': 7474,
'ENDPOINT':'/var/www/graph_db'
}
}
DATABASE_ROUTERS = ['neo4django.utils.Neo4djangoIntegrationRouter']
代碼中錯誤發生:
a = Anode.objects.create(art_type='py', mtime=str(file_mtime))
a.save()
我想我需要討論ge在我的port.conf
文件在Apache中,但我不知道該怎麼辦。我試過這樣的東西:
在ports.conf
中聽7474,但沒有運氣。任何幫助將不勝感激。謝謝
python版本:2.7和neo4django版本1.8 –
我認爲你的端點是不正確的 - 它應該是neo4django可以連接的外部路徑。沒有時間做更多的評論。 –