added search field in admin panel model Projects, added displayed fields almost like wanted

This commit is contained in:
alpcentaur 2023-02-27 17:09:28 +00:00
parent 4ba8ad0e6c
commit b403ef1cdd

View file

@ -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']