-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackedPolymorphicInline & Grappelli support #234
Comments
@vdboor now using If I find a moment I will likely try django-polymorphic with other packages which provide drag and drop ordering of inlines as this is the functionality I really desire. I can report back on them if it is of interest. |
What CSS class does Grapelli use to hide the empty template forms? |
I've added an explicit hiding rule to our template also works for grappelli. Does c8dd04b (and v1.0) work for you? (grappelli uses |
Thank you. This does hide the dummy forms and provide some compatibility with Grappelli. It doesn't work with the drag and drop reordering. I did look into merging the polymorphic inline template with the Grappelli one to enable this but I had little success. There is a small CSS tweak required for v1 when using Grappelli. I'll make a PR for it shortly. |
You're welcome! Glad to know it works. If you like to create the template, notice that the main difference from the standard template are:
This might help to reconstruct a grapelli template that works with polymorphic inlines. |
Hi! |
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 anorder
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.The text was updated successfully, but these errors were encountered: