I want to have two Databases in my social network Django project one realtional and one graphbased.i choose Mysql and Neo4j.my settings.py
file in my project is:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mylife',
'USER': 'root',
'PASSWORD': 'mypassword',
'HOST': '',
'PORT': '',
}
}
NEO4J_DATABSES = {
'default':{
'HOST':'localhost' ,
'PORT':7474,
'ENDPOINT':'db/data'
}
}
i append NEO4J_DATABSES
section according to neo4django documents but when i run pyhon manage.py syncdb
i got the below error:
AttributeError: 'Settings' object has no attribute 'NEO4J_DATABASES'
and when i write python manage.py shell
to test something when i write these codes i got same error:
>>> from neo4django.db import models
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/neo4django-0.1.8-py2.7.egg/neo4django /db/__init__.py", line 95, in <module>
if not _settings.NEO4J_DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'NEO4J_DATABASES'
Your have it misspelled in your settings.py
:
NEO4J_DATABSES
should be:
NEO4J_DATABASES