Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested_inlines does not show third inline #21

Open
lieuv opened this issue May 25, 2014 · 2 comments
Open

Nested_inlines does not show third inline #21

lieuv opened this issue May 25, 2014 · 2 comments

Comments

@lieuv
Copy link

lieuv commented May 25, 2014

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?

@artsim
Copy link

artsim commented Jun 24, 2014

Facing the same issue, any update?

Django 1.6.5 and python 2.7

@RRMoelker
Copy link

I was having the same issue just last week. Occasionally it would work, but it is unstable and has loads of other unresolved issues. This repository doesn't seem to be maintained anymore, is suggest using a fork by "spanishdict". That worked for me.

In your requirements file that is the requirement:
"-e git+https://github.com/spanishdict/django-nested-inlines.git#egg=django-nested-inlines"

PetrDlouhy pushed a commit to PetrDlouhy/django-nested-inlines that referenced this issue Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants