summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-25 17:58:13 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-25 17:59:03 +0200
commite0f0ce89eaddad18c9bb7ee04bacaf98fc8df29e (patch)
tree967eff32f234da8412cf3018c1226667fa3c4d4b
parent03595df54b937491268d5d00bb23bf5b707fbb82 (diff)
downloadIshtar-e0f0ce89eaddad18c9bb7ee04bacaf98fc8df29e.tar.bz2
Ishtar-e0f0ce89eaddad18c9bb7ee04bacaf98fc8df29e.zip
Admin: change parent - fix class inheritance order
-rw-r--r--ishtar_common/admin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py
index 26cd929d0..ceb01cab4 100644
--- a/ishtar_common/admin.py
+++ b/ishtar_common/admin.py
@@ -378,11 +378,12 @@ class ChangeParentForm(forms.Form):
super(ChangeParentForm, self).__init__()
self.fields["change_parent"].choices = choices
+
class ChangeParentAdmin:
def get_actions(self, request):
action_dct = super(ChangeParentAdmin, self).get_actions(request)
action_dct["change_parent_selected"] = (
- self.change_parent,
+ self.change_parent_admin,
"change_parent_selected",
_("Change parent of selected item(s)"),
)
@@ -1027,7 +1028,7 @@ class TownAdmin(ImportGEOJSONActionAdmin, ImportActionAdmin):
admin_site.register(models_common.Town, TownAdmin)
-class GeneralTypeAdmin(ImportActionAdmin, ImportJSONActionAdmin, ChangeParentAdmin):
+class GeneralTypeAdmin(ChangeParentAdmin, ImportActionAdmin, ImportJSONActionAdmin):
search_fields = (
"label",
"txt_idx",
@@ -1040,7 +1041,6 @@ class GeneralTypeAdmin(ImportActionAdmin, ImportJSONActionAdmin, ChangeParentAdm
serialize_type_action,
change_value("available", True, _("Make available")),
change_value("available", False, _("Make unavailable")),
- ChangeParentAdmin.get_actions(ChangeParentAdmin)
]
prepopulated_fields = {"txt_idx": ("label",)}
LIST_DISPLAY = ["label", "txt_idx", "available", "comment"]