From cc4e97f0a9e9c7c210e349c2fc0efb82ccfd101c Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Wed, 12 Feb 2025 13:11:58 +0100 Subject: [PATCH] Upgrade django target version. --- redirects/admin.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/redirects/admin.py b/redirects/admin.py index 47f5149..8a8bd87 100644 --- a/redirects/admin.py +++ b/redirects/admin.py @@ -7,6 +7,7 @@ @admin.register(Redirect) class RedirectAdmin(admin.ModelAdmin): + @admin.display(description=_("Redirect")) def redirect_display(self, obj): gone = _("(410 Gone)") if obj.new_path == "" else "" html = f""" @@ -22,8 +23,7 @@ def redirect_display(self, obj): html = mark_safe(html) return html - redirect_display.short_description = _("Redirect") - + @admin.display(description=_("Test")) def test_display(self, obj): css = """ font-weight: normal; @@ -43,8 +43,6 @@ def test_display(self, obj): html = mark_safe(html) return html - test_display.short_description = _("Test") - list_display = ( "redirect_display", "match",