[Django]-"settings.DATABASES is improperly configured. […]" when using neo4django.auth and neo4django.admin with only neo4j db

3👍

For the database settings, I typically just use

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': '',
        'USER': '',
        'PASSWORD': '',
        'HOST': '',
        'PORT': ''
    }
}

I know it’s annoying, but as long as you don’t run syncdb, no sqlite file is created (and neo4django doesn’t require syncdb anyway).

As far as the admin.py goes, I noticed you’re importing from django- you need to be importing from neo4django. Try

from neo4django import admin
from users.models import Person

class PersonAdmin(admin.ModelAdmin):
    ...    

admin.site.register(Person, PersonAdmin)

EDIT:

One more tip – you’ll probably want to set single=True on the user relationship, since a Person should only have one user. If a User should only have one person, I’d also set related_single=True, related_name='person' so you can access both as objects instead of managers.

0👍

There you go:

https://docs.djangoproject.com/en/1.5/intro/tutorial01/#database-setup

You have bad ENGINE for database.

Leave a comment