From ace7fde295fff5108f728d3fab113066d90e451f Mon Sep 17 00:00:00 2001 From: corsaronero Date: Thu, 3 Nov 2022 16:37:18 +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']