-
Notifications
You must be signed in to change notification settings - Fork 177
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
Does not work with polymorphic package #327
Comments
Ok, will have a look for the next release. |
TL;DR A quick workaround is using a custom class CustomPolyParentAdmin(PolymorphicParentModelAdmin):
@property
def change_list_template(self):
return "admin/change_list.html"
@admin.register(models.Parent)
class ParentAdmin(SortableAdminMixin, CustomPolyParentAdmin):
child_models = (models.ChildA, models.ChildB) This should work assuming you are not using any custom templates, in which case you would have to specify the path to your custom template instead of `"admin/change_list.html". Unsure what you need to do if you are using multiple mixins, as that gets confusing. The issue stems from the fact that the property
Which is a supported feature of SimpleTemplateResponse. I believe the issue was introduced in #316 |
Brand new, minimal django project. On admin pages for parent polymorphic model with sortable admin mixin gives error:
models.py
admin.py
Versions
Stuck
I don't know if
SortableAdminMixin
is the culprit orPolymorphicParentModelAdmin
. #196 does not work for me. I addedSortableAdminMixin
toChildAAdmin
andChildBAdmin
orChildAdmin
and I still get the same error.The text was updated successfully, but these errors were encountered: