Skip to content

Nested_inlines does not show third inline #21

Open
@lieuv

Description

@lieuv

Hi,

I'm trying to use nested_inlines and read that the bug, that the third inline is not shown was already fixed. But still I have the same problems. I'm using django 1.6.5 and python 2.7.5. The nested_inlines I downloaded from https://pypi.python.org/pypi/django-nested-inlines .

I tried the examples in the internet and put 'nested_inlines' into the INSTALLED_APPS, but I don't see the third line in my admin site.

Here my code in models.py:
from django.db import models

class A(models.Model):
name = models.CharField(max_length = 200)

class B(models.Model):
name = models.CharField(max_length = 200)
fk_a = models.ForeignKey('A')

class C(models.Model):
name = models.CharField(max_length = 200)
fk_b = models.ForeignKey('B')

admin.py:
from django.contrib import admin
from .models import A,B,C
from nested_inlines.admin import NestedStackedInline, NestedModelAdmin

class cInline (NestedStackedInline):
model = C

class bInline(NestedStackedInline):
model = B
inlines = [cInline,]
extra = 1

class aAdmin(NestedModelAdmin):
inlines =[bInline,]

admin.site.register(A, aAdmin)

What did I forgot? Any advices?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions