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.
- [Django]-How to send object from detail view to another view in Django?
- [Django]-What are some of the core conceptual differences between C# and Python?
- [Django]-How to make my models follow DRY principles
- [Django]-Django with PIL – '_io.BytesIO' object has no attribute 'name'
- [Django]-How to escape a single quote within trans when the line is already wrapped with single quotes?
Source:stackexchange.com