-
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Description
I think the display fixer doesn't support this use case from the docs:
- A string representing a model attribute or method (without any required arguments).
Would be nice to have it work in that case too:
+from django.contrib import admin
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=50)
birthday = models.DateField()
+ @admin.display(description='Birth decade')
def decade_born_in(self):
return '%d’s' % (self.birthday.year // 10 * 10)
- decade_born_in.short_description = 'Birth decade'ulgens
Metadata
Metadata
Assignees
Labels
No labels