Browse Source

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

master
corsaronero 2 years ago
parent
commit
ace7fde295
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      input/admin.py

+ 2
- 1
input/admin.py View File

@ -29,7 +29,8 @@ admin.site.add_action(export_as_csv)
@admin.register(Project) @admin.register(Project)
class ProjectAdmin(admin.ModelAdmin): class ProjectAdmin(admin.ModelAdmin):
save_as = True 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'] # action = ['export_as_csv']

Loading…
Cancel
Save