From f8e8d093c1455989fb5e6042cea90ef868dd7be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benni=20B=C3=A4rmann?= Date: Mon, 12 Dec 2022 10:26:19 +0000 Subject: [PATCH] search fields for travel and honorary are using foreign keys now, with the notation of double underscores --- input/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input/admin.py b/input/admin.py index 01902fd..209e578 100755 --- a/input/admin.py +++ b/input/admin.py @@ -66,7 +66,7 @@ class AccountAdmin(admin.ModelAdmin): @admin.register(HonoraryCertificate) class HonoraryCertificateAdmin(admin.ModelAdmin): save_as = True - search_fields = ['realname', 'granted'] + search_fields = ['realname', 'granted', 'project__name', 'project__pid'] list_display = ('realname', 'granted','project') date_hierarchy = 'granted_date' autocomplete_fields = ['project'] @@ -92,7 +92,7 @@ class IFGAdmin(admin.ModelAdmin): @admin.register(Travel) class TravelAdmin(admin.ModelAdmin): 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_links = ('realname', 'project') date_hierarchy = 'project_end'