Opened 10 years ago

Closed 10 years ago

#21299 closed Bug (fixed)

verbose_name inconsistently capitalized in admin inlines

Reported by: Renato Oliveira Owned by: nobody
Component: contrib.admin Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When I create an instance of a BaseInlineAdmin, the given verbose_name is capitalized. If I give an abbreviation like 'ABC' to verbose_name, it displays 'Abc'.

The same behavior happens in the verbose_name_plural, but only in the StackedInline model.

I'm willing to fix this if it's accepted as a bug.

Change History (4)

comment:1 Changed 10 years ago by Renato Oliveira

Sorry, InlineModelAdmin

comment:2 Changed 10 years ago by Tim Graham

Summary: verbose_name capitalized in Admin inlinesverbose_name inconsistently capitalized in admin inlines
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

django/contrib/admin/templates/admin/edit_inline/stacked.html uses the title filter, while tabular.html uses capfirst. I suppose both could use capfirst.

The bug stems from this behavior of the title filter:

>>> from django.template.defaultfilters import capfirst, title
>>> title("ABC News")
u'Abc News'

I've created #21306 to document (or possibly change) this behavior.

comment:3 Changed 10 years ago by Renato Oliveira

I sent a pull request, but I don't know how to test this.

comment:4 Changed 10 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 43569647ab234cd1d2f4d41399b97b4b793d573a:

Fixed #21299 - Changed filters from title to capfirst on admin inline formsets.

Previously there was a mixture of the two which resulted in inconsistent

Note: See TracTickets for help on using tickets.
Back to Top