62👍
✅
Model._meta.verbose_name.title()
and
Model._meta.verbose_name_plural.title()
return singular and plural Model’s verbose names accordingly. There’s also Model._meta.verbose_name_raw
property, it seems to return unicode string for me, while verbose_name.title()
returns a normal string, but I’m not sure what’s the real difference between this and verbose_name.title()
.
6👍
Model._meta.verbose_name.title()
returns verbose name with First Character Uppercase while Model._meta.verbose_name_raw
property returns the verbose name you wrote in the model class.
- [Django]-Type object 'X' has no attribute 'objects'
- [Django]-Django / Comet (Push): Least of all evils?
- [Django]-How to set up Django website with jQuery
Source:stackexchange.com