Re: More than one stackedinline in admin
On Fri, Oct 23, 2009 at 8:24 AM, Caisys <amamdouh@gmail.com> wrote:
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)
----------------------------
You want to create a single ModelAdmin class for model1, specifying both child1inline and child2inline, in its inlines attribute.
Karen
Karen
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home