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
How to use ImportExportModelAdmin together with SortableAdminMixin from admin-sortable2 #1531
Comments
At first glance it looks like an error in adminsortable2, but can you post the full stack trace (along with the versions you are using) |
Did you solve this? Can we close? |
sorry for not answering. In the stacktracke the error appears in a class of adminsortable2, so I opened an issue there. So I guess we can close here for now, unless you have an idea? |
Will close for now and will re-open if it looks like an import-export issue. |
I think this is class MyAdmin(ImportExportMixin, SortableAdminMixin, admin.ModelAdmin):
change_list_template = "admin/import_export/change_list.html" The substantial part is the For the reverse order of the mixins ( |
We decided to document these clashes rather than try to fix. If we have a robust fix in future, we can perhaps consider including it. |
I changed my code to this. I can now see the drag handler, but cannot use them as they don't work. Am I anything missing. Works when I only use the SortableAdminMixin. |
You could try @PetrDlouhy patch and see if that works for you. I decided not to merge into the main codebase, instead documented the workaround here. |
Unfortunately this also didn't work. Still drag & drop is not working in combination with import/export mixin |
Sorry to say I can't help further. It looks like various 3rd party libraries don't work well together. If you get it working or find a workaround, please post back here. |
@matthewhegarty I think that ideal state of this issue is, that cooperation with I would like to contribute to solve this issue somehow. @micudaj I have identified another issue which causes that class MyAdmin(ImportExportMixin, SortableAdminMixin, admin.ModelAdmin):
change_list_template = "adminsortable2/change_list.html" |
Hey PetrDlouhy, With your fixes drag & drop works. Thank you! But now I have the import export buttons in the top right twice. It is more of a cosmetic topic, but maybe this can easily be avoided. |
Never mind. Was an issue on my side with a change I tried before. |
I tried to use ImportExportModelAdmin together with SortableAdminMixin from admin-sortable2, but I get the following error. Any idea how and if. these can work together?
Thanks you in advance!
The text was updated successfully, but these errors were encountered: