fix unsortable custom columns, fix font-size discrepancy on fixed buttons, lint

This commit is contained in:
Rachid Mrad 2023-09-11 17:50:49 -04:00
parent 2df68d4b52
commit 2dd6bc6f05
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF
2 changed files with 8 additions and 1 deletions

View file

@ -200,6 +200,10 @@ class DomainAdmin(ListHeaderAdmin):
def organization_type(self, obj):
return obj.domain_info.organization_type
organization_type.admin_order_field = ( # type: ignore
"domain_info__organization_type"
)
# Filters
list_filter = ["domain_info__organization_type"]
@ -265,7 +269,7 @@ class ContactAdmin(ListHeaderAdmin):
# is not allowing a short_description attr on it
# This gets around the linter limitation, for now.
def contact(self, obj: models.Contact):
""" Duplicate the contact _str_"""
"""Duplicate the contact _str_"""
if obj.first_name or obj.last_name:
return obj.get_formatted_name()
elif obj.email:
@ -275,6 +279,8 @@ class ContactAdmin(ListHeaderAdmin):
else:
return ""
contact.admin_order_field = "first_name" # type: ignore
class WebsiteAdmin(ListHeaderAdmin):
"""Custom website admin class."""

View file

@ -163,6 +163,7 @@ table > caption > span {
.delete-confirmation form .cancel-link,
.submit-row a.closelink {
height: auto!important;
font-size: 14px;
}
// Keep th from collapsing