diff --git a/rentals/admin.py b/rentals/admin.py index 4c88c55..640ad72 100644 --- a/rentals/admin.py +++ b/rentals/admin.py @@ -30,3 +30,6 @@ class LockerInfoAdmin(admin.ModelAdmin): list_filter = ["locker_unit__bank", "locker_unit", "renter"] list_display = ["locker_unit", "address", "blind_code", "bitting_code", "renter"] list_display_links = ["locker_unit", "address"] + + def get_queryset(self, request): + return LockerInfo.objects.select_related("locker_unit", "locker_unit__bank")