scholrly / neo4django

Drop-in Neo4j/Django integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Model Inheritance and Admin Interface

meatballs opened this issue · comments

I have a problem with inheritance and the admin interface. Using the following simple inheritance structure, the 'name' field does not appear in the admin screens.

Using the same structure with django.db instead of neo4djang.db works fine.

Moving the name field into the Child class also works fine.

This is on django 1.5.5 and the github repo version of neo4django.

models.py:

from neo4django.db import models

class Parent(models.NodeModel):
    name = models.StringProperty()

    class Meta:
        abstract = True

class Child(Parent):
    pass

admin.py:

from neo4django import admin
from core.models import Child

class ChildAdmin(admin.ModelAdmin):
    pass

admin.site.register(Child, ChildAdmin)