diff --git a/storekit/admin.py b/storekit/admin.py index e6e89b5..4ef791c 100644 --- a/storekit/admin.py +++ b/storekit/admin.py @@ -26,6 +26,9 @@ class ReceiptAdmin(admin.ModelAdmin): 'version_external_identifier', 'receipt_creation_date', 'request_date', 'original_purchase_date', 'in_app' ) + def get_queryset(self, request): + return super().get_queryset(request).select_related('in_app') + admin.site.register(Receipt, ReceiptAdmin) @@ -34,5 +37,8 @@ class ResponseAdmin(admin.ModelAdmin): list_display = ('status', 'environment', 'receipt') list_display_links = ('status', 'environment', 'receipt') + def get_queryset(self, request): + return super().get_queryset(request).select_realated('receipt') + admin.site.register(Response, ResponseAdmin)