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?
views:
136answers:
2
+2
A:
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>
Glader
2009-06-16 17:19:25
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:16
No. They use capfirst everywhere to print verbose_name_plural.
Glader
2009-06-17 02:51:20
A:
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).
Mitch
2009-06-17 12:53:23