From 234ac6490433e56d7b7c9b15e71ce10409ae4f3a Mon Sep 17 00:00:00 2001 From: Vinogradov Anton Date: Wed, 28 Aug 2024 22:14:53 +0300 Subject: [PATCH] fix: is_deleted fs hidden from the object creation form for all models --- application/backend/projects/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/backend/projects/admin.py b/application/backend/projects/admin.py index 9c12484..838a972 100644 --- a/application/backend/projects/admin.py +++ b/application/backend/projects/admin.py @@ -5,16 +5,20 @@ # Register your models here. @admin.register(Project) class ProjectAdmin(admin.ModelAdmin): + fields = ('project_name','project_description','project_start_time','project_end_time','employee') list_display = ("id","project_name", "project_start_time","project_end_time") search_fields = ('project_name','project_description','project_end_time','project_start_time','id') list_filter = ('project_start_time','project_end_time','employee') @admin.register(Report) class ReportAdmin(admin.ModelAdmin): + fields = ('report_name','report_creater','report_start','related_project','report_finish','report_green_comment','report_yellow_comment','report_red_comment','employee_going_vacation', + 'anyone_going_vacation','other_comments','final_report_color') list_display = ("id","report_name", "report_start","report_finish","employee_going_vacation","report_creater","related_project","final_report_color") list_filter = ('report_creater',"related_project",'report_start','report_finish',"final_report_color","employee_going_vacation") search_fields = ('report_name','report_start','report_finish') @admin.register(Objective) class ObjectiveAdmin(admin.ModelAdmin): + fields = ('objective_name',"objective_descripion",'related_report','objective_color') list_display = ("id","objective_name","objective_descripion", "related_report","objective_color") list_filter = ('related_report','objective_color') search_fields = ('objective_name','objective_descripion','id')