Skip to content

Commit

Permalink
Upgrade django target version.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocaccamo committed Feb 12, 2025
1 parent bd10c1e commit cc4e97f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions redirects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand All @@ -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;
Expand All @@ -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",
Expand Down

0 comments on commit cc4e97f

Please sign in to comment.