0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-03-16 21:23:36 +00:00

Exclude "body" from the Ping admin form

"body" is an obsolete field and kept around for the sake
of very old pings. For all new pings body data goes either
into the "body_raw" binary field (for small bodies)
or in the object storage (for not so small bodies).
So it is not useful to show the body field in the Ping admin.
This commit is contained in:
Pēteris Caune 2023-09-22 09:35:51 +03:00
parent 8dbbd5b9d6
commit 507fd840d8
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2

View file

@ -162,10 +162,11 @@ class LargeTablePaginator(Paginator):
@admin.register(Ping)
class PingsAdmin(admin.ModelAdmin):
search_fields = ("owner__name", "owner__code")
readonly_fields = ("owner",)
readonly_fields = ("owner", "has_body")
list_select_related = ("owner",)
list_display = ("id", "created", "owner", "scheme", "method", "object_size", "ua")
list_filter = ("created", SchemeListFilter, MethodListFilter, KindListFilter)
exclude = ("body",)
paginator = LargeTablePaginator
show_full_result_count = False