diff --git a/api/admin.py b/api/admin.py index 4aba39ab..c3bbd014 100644 --- a/api/admin.py +++ b/api/admin.py @@ -272,6 +272,10 @@ class LNPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin): "order_escrow", "order_paid_LN", ) + raw_id_fields = ( + "receiver", + "sender", + ) list_filter = ("type", "concept", "status") ordering = ("-expires_at",) search_fields = [ @@ -302,6 +306,10 @@ class OnchainPaymentAdmin(AdminChangeLinksMixin, admin.ModelAdmin): "balance", "order_paid_TX", ) + raw_id_fields = ( + "receiver", + "balance", + ) list_display_links = ("id", "address", "concept") list_filter = ("concept", "status") search_fields = ["address", "num_satoshis", "receiver__username", "txid"] diff --git a/chat/admin.py b/chat/admin.py index b688791c..86619d29 100644 --- a/chat/admin.py +++ b/chat/admin.py @@ -21,6 +21,11 @@ class ChatRoomAdmin(AdminChangeLinksMixin, admin.ModelAdmin): ) change_links = ["order", "maker", "taker"] search_fields = ["id"] + raw_id_fields = ( + "order", + "maker", + "taker", + ) @admin.register(Message) @@ -38,3 +43,9 @@ class MessageAdmin(AdminChangeLinksMixin, admin.ModelAdmin): search_fields = ["id", "index"] ordering = ["-chatroom_id", "-index"] list_filter = ("chatroom",) + raw_id_fields = ( + "order", + "chatroom", + "receiver", + "sender", + )