Skip to content

Instantly share code, notes, and snippets.

@skyleronken
Created January 18, 2014 21:11
Show Gist options
  • Save skyleronken/8496526 to your computer and use it in GitHub Desktop.
Save skyleronken/8496526 to your computer and use it in GitHub Desktop.
Broken attempt to use neo4django admin interface
from neo4django.graph_auth.models import User as GraphUser
class User(GraphUser):
objects = UserManager()
slug = models.StringProperty()
birthday = models.DateProperty()
gender = models.StringProperty()
middle_name = models.StringProperty()
profiles = models.Relationship('Profile',
rel_type='belongs_to',
related_name='owner')
...
AUTHENTICATION_BACKENDS = ('neo4django.graph_auth.backends.NodeModelBackend',
)
...
AUTH_USER_MODEL = 'myapp.User'
INSTALLED_APPS = (
'neo4django.graph_auth',
'django.contrib.sessions',
'django.contrib.messages',
'neo4django.admin',
'neo4django.contenttypes',
'django.contrib.auth',
'django.contrib.contenttypes',
#'django.contrib.sites',
'django.contrib.staticfiles',
'tastypie',
'django.contrib.admin',
'myapp',
)
...
from django.conf.urls import patterns, include, url # @UnusedImport
from neo4django import admin
admin.autodiscover()
urlpatterns = patterns('',
...
url(r'^admin/', include(admin.site.urls)),
...
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment