Browse Source

search fields for travel and honorary are using foreign keys now, with the notation of double underscores

master v2
Benni Bärmann 1 year ago
parent
commit
f8e8d093c1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      input/admin.py

+ 2
- 2
input/admin.py View File

@ -66,7 +66,7 @@ class AccountAdmin(admin.ModelAdmin):
@admin.register(HonoraryCertificate) @admin.register(HonoraryCertificate)
class HonoraryCertificateAdmin(admin.ModelAdmin): class HonoraryCertificateAdmin(admin.ModelAdmin):
save_as = True save_as = True
search_fields = ['realname', 'granted']
search_fields = ['realname', 'granted', 'project__name', 'project__pid']
list_display = ('realname', 'granted','project') list_display = ('realname', 'granted','project')
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
autocomplete_fields = ['project'] autocomplete_fields = ['project']
@ -92,7 +92,7 @@ class IFGAdmin(admin.ModelAdmin):
@admin.register(Travel) @admin.register(Travel)
class TravelAdmin(admin.ModelAdmin): class TravelAdmin(admin.ModelAdmin):
save_as = True save_as = True
search_fields = ['realname', 'service_id', 'granted_date']
search_fields = ['realname', 'service_id', 'granted_date', 'project__name', 'project__pid']
list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project_end', 'project', 'project_end_quartal') list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project_end', 'project', 'project_end_quartal')
list_display_links = ('realname', 'project') list_display_links = ('realname', 'project')
date_hierarchy = 'project_end' date_hierarchy = 'project_end'

Loading…
Cancel
Save