Reputation: 1084
I followed the instructions in the neo4django:admin docs, also set up the neo4django:auth according to the instructions.
However, after logging in I get
"You don't have permission to edit anything."
I want to edit the data defined in my lit
app. My lit/admin.py
looks like:
from neo4django import admin
from lit.models import Literature
admin.site.register(Literature)
...if that matters.
Any ideas what I got wrong?
Upvotes: 3
Views: 139
Reputation: 14809
Any chance you could share the MIDDLEWARE
and INSTALLED_APPS
parts of your settings.py? I've run into this too- trying to follow my own instructions, nonetheless!
EDIT:
Here's a copy of part of my settings.py, urls.py and admin.py for a toy social networking app I'm putting together as a demo. These work fine with the latest neo4django, against Neo4j 1.9.
social_network/settings.py
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
INSTALLED_APPS = (
'neo4django.auth',
'django.contrib.sessions',
'django.contrib.messages',
'neo4django.admin',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.staticfiles',
'friends', # the django app
)
social_network/urls.py
from django.conf.urls import patterns, include, url
from neo4django import admin
admin.autodiscover()
from friends.views import (...)
urlpatterns = patterns('',
# ...
(r'^admin/', include(admin.site.urls)),
)
Finally, friends/admin.py looks like
from neo4django import admin
from .models import Person
class PersonAdmin(admin.ModelAdmin):
pass
admin.site.register(Person, PersonAdmin)
Upvotes: 2