From b403ef1cddfbe017fb15211dffc92df639829320 Mon Sep 17 00:00:00 2001 From: alpcentaur Date: Mon, 27 Feb 2023 17:09:28 +0000 Subject: [PATCH] added search field in admin panel model Projects, added displayed fields almost like wanted --- input/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input/admin.py b/input/admin.py index 29e35e4..544b531 100644 --- a/input/admin.py +++ b/input/admin.py @@ -29,7 +29,8 @@ admin.site.add_action(export_as_csv) @admin.register(Project) class ProjectAdmin(admin.ModelAdmin): save_as = True - readonly_fields = ('pid','finance_id','project_of_year') + search_fields = ('name', 'pid','finance_id', 'start', 'end', 'participants_estimated', 'participants_real', 'cost', 'status') + list_display = ('name', 'pid','finance_id', 'start', 'end', 'participants_estimated', 'participants_real', 'cost', 'status') # action = ['export_as_csv']