I tried:
------------------------
class child1Inline(admin.StackedInline):
        model = child1
        extra = 2

class child2Inline(admin.StackedInline):
        model = child2
        extra = 2

class child1Admin(admin.ModelAdmin):
        inlines = [child1Inline]

class child2Admin(admin.ModelAdmin):
        inlines = [child2Inline]


admin.site.register(model1, child1Admin, child2Admin)
----------------------------
On Oct 21, 3:45 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Oct 21, 2:42 pm, Caisys <amamd...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
> > Suppose i have 3 model classes:
> > ----------------
> > class model1(model.Models):
> >     fields .....
>
> > class child1(models.Model):
> >      model1 = models.ForeignKey(model1)
>
> > class child2(models.Model):
> >      model1 = models.ForeignKey(model1)
>
> > ------------------
>
> > Is it possible to have child1 and child2 appear on the admin page of
> > model1 as StackedInline ??
>
> > Thanks
>
> Yes, it is. What happened when you tried?
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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