Skip to content

Commit

Permalink
Admin > Department: Autocomplete field for Union field
Browse files Browse the repository at this point in the history
  • Loading branch information
mhewel committed Oct 7, 2024
1 parent d80ced7 commit 197d1a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions members/admin/department_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class DepartmentAdmin(admin.ModelAdmin):
"closed_dtm",
"has_waiting_list",
)
autocomplete_fields = ("union",)
raw_id_fields = ("union",)
search_fields = (
"name",
Expand Down
1 change: 1 addition & 0 deletions members/admin/union_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 197d1a0

Please sign in to comment.