Can I force the first letter of the verbose_name of a django model field to be lower case?

Go To StackoverFlow.com

2

Django automatically capitalizes the first letter of the verbose_name of a field in a model. I'd like it to be lower case. Is there a way to do that?

2009-06-16 14:48
by Mitch


2

Override template 'admin/index.html' and change

<th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>

to

<th scope="row"><a href="{{ model.admin_url }}">{{ model.name|lower }}</a></th>
2009-06-16 17:19
by Glader
Thanks. That does work for the index page. Any thoughts on targeting it more specifically to one of the fields of a sub-class of models.Model - Mitch 2009-06-16 21:04
No. They use capfirst everywhere to print verbosenameplural - Glader 2009-06-17 02:51


0

A workable but somewhat kludgy solution that I am going to use is to make the first character of my verbose_name strings the unicode Zero Width Space (\u200B).

2009-06-17 12:53
by Mitch
Ads