From 197d1a017a774c16e369c7607d9f28fe297e6672 Mon Sep 17 00:00:00 2001 From: mhewel <58829786+mhewel@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:57:27 +0200 Subject: [PATCH] Admin > Department: Autocomplete field for Union field --- members/admin/department_admin.py | 1 + members/admin/union_admin.py | 1 + 2 files changed, 2 insertions(+) diff --git a/members/admin/department_admin.py b/members/admin/department_admin.py index ea681b3a..8502bf71 100644 --- a/members/admin/department_admin.py +++ b/members/admin/department_admin.py @@ -117,6 +117,7 @@ class DepartmentAdmin(admin.ModelAdmin): "closed_dtm", "has_waiting_list", ) + autocomplete_fields = ("union",) raw_id_fields = ("union",) search_fields = ( "name", diff --git a/members/admin/union_admin.py b/members/admin/union_admin.py index 186d8fc9..85176cd9 100644 --- a/members/admin/union_admin.py +++ b/members/admin/union_admin.py @@ -93,6 +93,7 @@ class UnionAdmin(admin.ModelAdmin): "founded_at", "closed_at", ) + search_fields = ("name",) filter_horizontal = ["board_members"] raw_id_fields = ("chairman", "second_chair", "cashier", "secretary")