I am trying to use a neo4j
database on a django
website hosted on a Apache
server. I am using neo4django
. I have followed the instruction given in http://neo4django.readthedocs.org/en/v0.1.8/index.html. when creating a node, I get the following error:
error at /disk/ [Errno 111] Connection refused Request
My 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:
My settings.py:
NEO4J_DATABASES = {
'default' : {
'HOST':'localhost',
'PORT': 7474,
'ENDPOINT':'/var/www/graph_db'
}
}
DATABASE_ROUTERS = ['neo4django.utils.Neo4djangoIntegrationRouter']
Code where the error happens:
a = Anode.objects.create(art_type='py', mtime=str(file_mtime))
a.save()
I think I need to change something in my port.conf
file in Apache ,but I don't know what I should do. I have tried things like:
Listen 7474 in the ports.conf
, but no luck. Any help will be appreciated. Thanks