mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Improve admin panel loading times
This commit is contained in:
parent
dc24ff7a51
commit
d0450fc07d
@ -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"]
|
||||
|
@ -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",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user