-
-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Labels
Description
Hi I'm using commit #4a60c1f so apologies if this is on its way and thank you to everyone contributing to this project.
Currently when using Grappelli with polymorphic I can use StackedPolymorphicInline to create the inline as per the docs but it does not render correctly in the admin site.
It appears the blank dummy forms are being displayed and validated on submission and new forms are added in a strange way.
Also Grappelli's drag and drop reordering through sortable_field_name doesn't appear compatible. It would be amazing to have this working with an order field on the parent model.
I've attached a couple of screenshots showing the StackedPolymorphicInline when adding a new object and after adding a child field.
class ContentBlockInline(StackedPolymorphicInline):
class WYSIWYGBlockInline(StackedPolymorphicInline.Child):
model = WYSIWYGBlock
class HeroBlockInline(StackedPolymorphicInline.Child):
model = HeroBlock
model = ContentBlock
child_inlines = (WYSIWYGBlockInline, HeroBlockInline)
extra = 0
min_num = 0
sortable_field_name = 'order'
ADR-007 and Safrone

