There’s a similar question concerning a field’s verbose_name: How to stop auto-capitalization of verbose_name in django
When listing available models of an app in the admin index page, Django always capitalizes the first letter of the model’s verbose_name_plural and use it as the model’s name.
Here’s the code from django.contrib.admin.sites.py:
model_dict = {
'name': capfirst(model._meta.verbose_name_plural),
'perms': perms,
}
But consider the following screenshot, I want to display “vCenters” instead of “VCenters”.
I can remove the capfirst, and explicitly capitalize other models’ verbose_name_plural to make it work.
But I have to change django’s source code and it doesn’t seem to be a bug of Django. Are there any better solutions?
It’s not that easy…
admin/index.htmltemplate to yourtemplate/admin/index.htmllowerfirst_if_starts_with_vin yourown
templatetags/my_special_thing.pydirectoryindex.htmlindex.htmlon line23And done.