From 3a467840e4e8bf2f2ad3ff1b9c01e3b2599c8220 Mon Sep 17 00:00:00 2001 From: Seyed Alireza Hashemi Date: Tue, 5 Nov 2024 11:16:24 +0330 Subject: [PATCH] fix: make fsm django admin lighter --- apps/fsm/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/fsm/admin.py b/apps/fsm/admin.py index b0d591c9..66bf16f7 100644 --- a/apps/fsm/admin.py +++ b/apps/fsm/admin.py @@ -175,6 +175,8 @@ class FSMAdmin(admin.ModelAdmin): 'mentors_num', 'mentors_list', 'online_teams_in_last_hour'] list_filter = ['name'] search_fields = ['name'] + autocomplete_fields = ['creator', 'mentors', + 'program', 'first_state', '_object'] actions = [clone_fsm] def mentors_list(self, obj): @@ -491,6 +493,7 @@ class WidgetHintCustomAdmin(admin.ModelAdmin): class ProgramCustomAdmin(admin.ModelAdmin): list_display = ['id', 'name', 'registration_form', 'creator'] list_display_links = ['id', 'name'] + search_fields = ['name'] @admin.register(UploadFileProblem)