For instance I have model A with foreign key to B
and model B with foreign key to C.
I would like to have add form of C with
one B (extra = 1) and within B four A (extra = 4)
With the following example in admin.py I can only achieve this partly:
for object C I have only extra B object without A objects related to B object.
class AInline(admin.TabularInline):
model = A
extra = 4
class BAdmin(admin.ModelAdmin):
inlines = [AInline]
class BInline(admin.TabularInline):
model = B
extra = 1
class CAdmin(admin.ModelAdmin):
inlines = [BInline]
So can somebody explain me how to do dies, that I can have complete add-form
inside the object C: with extra object B together with extra (sub)objects C ?
Excuse me for bad english and lot of text.
Thanks in advance for any hint.
Best regards
Ogi