From 78f5d79e01d2c71b17189b7c90ffa1e9bc3bca59 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 28 Jan 2022 16:03:58 -0500 Subject: [PATCH] Add search fields for locker rentals --- rentals/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rentals/admin.py b/rentals/admin.py index db93b91..b969b78 100644 --- a/rentals/admin.py +++ b/rentals/admin.py @@ -24,4 +24,6 @@ class LockerUnitAdmin(admin.ModelAdmin): inlines = [LockerRentalInline] -admin.site.register(LockerRental) +@admin.register(LockerRental) +class LockerRentalAdmin(admin.ModelAdmin): + search_fields = ["user__username", "locker_unit__bank__name"]