1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #16117 -- Added decorators for admin action and display functions.

Refs #25134, #32099.
This commit is contained in:
Nick Pope
2021-01-13 16:19:22 +00:00
committed by GitHub
parent 83fcfc9ec8
commit 9204485396
18 changed files with 422 additions and 148 deletions

View File

@@ -1,3 +1,4 @@
from django.contrib import admin
from django.db import models
from django.utils.translation import gettext_lazy as _
@@ -28,9 +29,9 @@ class Article(models.Model):
def test_from_model(self):
return "nothing"
@admin.display(description='not What you Expect')
def test_from_model_with_override(self):
return "nothing"
test_from_model_with_override.short_description = "not What you Expect"
class ArticleProxy(Article):