Hi
I'm new in Django and want to explain my issue:

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to