diff --git a/ccdb/locations/admin.py b/ccdb/locations/admin.py index bed516b..4f78ebc 100644 --- a/ccdb/locations/admin.py +++ b/ccdb/locations/admin.py @@ -15,7 +15,7 @@ class RegionAdmin(admin.ModelAdmin): class SiteAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'region', 'description', 'sort_order') list_display_links = ('name',) - search_fields = ('name', 'code', 'region', 'description') + search_fields = ('name', 'code', 'region__name', 'description') list_per_page = 25 fields = ('name', 'code', 'region', 'description', 'sort_order') @@ -24,7 +24,7 @@ class MunicipalLocationAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'site', 'municipal_location_type', 'description', 'sort_order') list_display_links = ('name',) - search_fields = ('name', 'code', 'site', 'municipal_location_type', + search_fields = ('name', 'code', 'site__name', 'municipal_location_type', 'description') list_per_page = 25 fields = ('name', 'code', 'site', 'municipal_location_type', @@ -36,8 +36,8 @@ class StudyLocationAdmin(admin.ModelAdmin): 'treatment_type', 'municipal_location', 'collecting_location', 'description', 'sort_order') list_display_links = ('name',) - search_fields = ('name', 'code', 'site', 'study_location_type', - 'treatment_type', 'municipal_location', 'collecting_location', + search_fields = ('name', 'code', 'site__name', 'study_location_type', + 'treatment_type', 'municipal_location__name', 'collecting_location', 'description') list_per_page = 25 fields = ('name', 'code', 'site', 'study_location_type', diff --git a/ccdb/misc/admin.py b/ccdb/misc/admin.py index 586bf54..9627d34 100644 --- a/ccdb/misc/admin.py +++ b/ccdb/misc/admin.py @@ -15,7 +15,8 @@ class MeasurementTypeAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'measurement_type_class', 'description', 'default_measurement_unit', 'sort_order') list_display_links = ('name',) - search_fields = ('name', 'code', 'measurement_type_class', 'description') + search_fields = ('name', 'code', 'measurement_type_class', + 'default_measurement_unit__code', 'description') list_per_page = 25 fields = ('name', 'code', 'measurement_type_class', 'description', 'default_measurement_unit', 'sort_order') @@ -25,8 +26,8 @@ class ContainerAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'application', 'color', 'material', 'volume', 'measurement_unit', 'sort_order') list_display_links = ('name',) - search_fields = ('name', 'code', 'application', 'color', 'material', - 'volume', 'measurement_unit') + search_fields = ('name', 'code', 'application', 'color__name', + 'material__name', 'volume', 'measurement_unit__name') list_per_page = 25 fields = ('name', 'code', 'application', 'color', 'material', 'volume', 'measurement_unit', 'sort_order') diff --git a/ccdb/projects/admin.py b/ccdb/projects/admin.py index dca2c37..669da6f 100644 --- a/ccdb/projects/admin.py +++ b/ccdb/projects/admin.py @@ -27,10 +27,10 @@ class GrantAdmin(admin.ModelAdmin): class GrantReportAdmin(admin.ModelAdmin): - list_display = ('title', 'report_type', 'description', 'due_date', + list_display = ('grant', 'title', 'report_type', 'description', 'due_date', 'submitted_date', 'attachment', 'sort_order') list_display_links = ('title',) - search_fields = ('title', 'report_type', 'description', 'due_date', + search_fields = ('grant__title', 'title', 'report_type', 'description', 'due_date', 'submitted_date', 'attachment') list_per_page = 25 fields = ('title', 'report_type', 'description', 'due_date',