diff --git a/hc/api/admin.py b/hc/api/admin.py index 79add96b..ade82b30 100644 --- a/hc/api/admin.py +++ b/hc/api/admin.py @@ -42,7 +42,7 @@ class ChecksAdmin(admin.ModelAdmin): url = reverse("hc-checks", args=[obj.project.code]) name = escape(obj.project_name or "Default") email = escape(obj.email) - return f'{name} • {email}' + return f'{email} › {name}' @mark_safe def name_tags(self, obj): @@ -177,9 +177,9 @@ class ChannelsAdmin(admin.ModelAdmin): search_fields = ["value", "project__owner__email"] list_display = ( "id", + "kind_", "name", "project_", - "formatted_kind", "value", "num_notifications", ) @@ -191,7 +191,7 @@ class ChannelsAdmin(admin.ModelAdmin): url = reverse("hc-checks", args=[obj.project.code]) name = escape(obj.project_name or "Default") email = escape(obj.email) - return f"{name} • {email}" + return f"{email} › {name}" def get_queryset(self, request): qs = super().get_queryset(request) @@ -201,13 +201,8 @@ class ChannelsAdmin(admin.ModelAdmin): return qs @mark_safe - def formatted_kind(self, obj): - if obj.kind == "email" and not obj.email_verified: - return "Email (unconfirmed)" - - return obj.get_kind_display() - - formatted_kind.short_description = "Kind" + def kind_(self, obj): + return f' {obj.kind}' def num_notifications(self, obj): return obj.notification__count diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html index 56c6b93a..78386aca 100644 --- a/templates/admin/base_site.html +++ b/templates/admin/base_site.html @@ -1,7 +1,11 @@ {% extends "admin/base_site.html" %} -{% load hc_extras %} +{% load hc_extras static %} {% block title %}{% site_name %} Administration{% endblock %} +{% block extrastyle %} + +{% endblock %} + {% block branding %}