Opened 5 years ago
Closed 5 years ago
#31889 closed Bug (invalid)
Django actions
Description ¶
Hi,
In the Admin actions documentation https://docs.djangoproject.com/en/3.1/ref/contrib/admin/actions/
make_published.short_description
should be self.short_description
Context:
class ArticleAdmin(admin.ModelAdmin): ... actions = ['make_published'] def make_published(self, request, queryset): queryset.update(status='p') make_published.short_description = "Mark selected stories as published"
Change History (2)
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
The docs are correct, we're setting
short_description
to the admin action, not theModelAdmin
instance itself.