9

I'm trying to use a simple abstract base class in django's admin interface with neo4django.

Example models.py

from neo4django.db import models

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

    class Meta:
        abstract = True

class Child(Parent):
    pass

Example admin.py:

from neo4django import admin
from core.models import Child

class ChildAdmin(admin.ModelAdmin):
    pass

admin.site.register(Child, ChildAdmin)

The 'name' field doesn't appear in the admin interface.

If I use the same basic structure, but with django.db instead of neo4django.db, it all works fine. Anyone spot where I've gone wrong?

Update from comments:

  • This has been tried with django 1.5.5 and 1.5.4
  • The neo4django version is from the github repo
  • Registering the model with or without a ModelAdmin have both been tried and made no difference
meatballs
  • 3,917
  • 1
  • 15
  • 19
  • have deleted my answer since I misread what was in the github issue – Anentropic Feb 20 '14 at 15:05
  • 1
    What version on `neo4django` are you using. If using the pip package then switch to the git package `pip install -e git+https://github.com/scholrly/neo4django/#egg=neo4django-dev` or better fork the project and use your own repo.Also, Django 1.6+ is not yet supported, and as I far as I remember there are some issues with the admin, after the development moved to support Django 1.5. – nikolasd Feb 20 '14 at 20:05
  • I'm using django 1.5.5 and the github package of neo4django – meatballs Feb 20 '14 at 20:08
  • I will try to investigate your issue and come with an answer, until then, I recommend raising an issue to Github. – nikolasd Feb 20 '14 at 20:14
  • I've created an issue on Github - https://github.com/scholrly/neo4django/issues/240 – meatballs Feb 25 '14 at 10:38
  • I've also tried downgrading to django 1.5.4, but that showed the same behaviour – meatballs Feb 25 '14 at 13:01
  • Does anyone found a solution. I'm using Django 1.7 and facing the same issue... – Matt Dec 26 '14 at 23:07

1 Answers1

-1

Have you tried just registering the model, without the ModelAdmin?

Matt Luongo
  • 14,371
  • 6
  • 53
  • 64