I'm starting a project and I keep getting this error when executing the
manage.py sql *ApplicationName*
The trace back is as follows:
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 304, in handle
app_output = self.handle_app(app, **options)
File "/usr/lib/python2.7/site-packages/django/core/management/commands/sql.py", line 19, in handle_app
return u'\n'.join(sql_create(app, self.style, connections[options.get('database')])).encode('utf-8')
File "/usr/lib/python2.7/site-packages/django/core/management/sql.py", line 31, in sql_create
output, references = connection.creation.sql_create_model(model, style, known_models)
File "/usr/lib/python2.7/site-packages/django/db/backends/creation.py", line 44, in sql_create_model
col_type = f.db_type(connection=self.connection)
File "/usr/lib/python2.7/site-packages/neo4django/utils.py", line 161, in __getattr__
return getattr(super(AttrRouter, self), name)
AttributeError: 'super' object has no attribute 'db_type'
The code is pretty much a simple example of the tutorial after many attempts to try to solve the problem.
The setings.py are also supposed to be correct, since they are copied from neo4Django tutorial.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'Database.db',
}
}
NEO4J_DATABASES = {
'default' : {
'HOST':'localhost',
'PORT':7474,
'ENDPOINT':'/db/data'
}
}
DATABASE_ROUTERS = ['neo4django.utils.Neo4djangoIntegrationRouter']
Neo4j server is running, and in the sqllite and also in a mysql database things are working, so the problem must be on the neo4j or neo4django side. Also things work when not using neo4Django models in the domain.
The model is as presented:
from neo4django.db import models
class Person(models.NodeModel):
name = models.StringProperty()
age = models.IntegerProperty()
friends = models.Relationship('self',rel_type='friends_with')