-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Default column heading from field.verbose_name is not titlised, but it should be #249
Closed
chrkr opened this issue
May 13, 2015
· 2 comments
· Fixed by mozilla/addons-server#4430 or drummonds/bene#50
Closed
Default column heading from field.verbose_name is not titlised, but it should be #249
chrkr opened this issue
May 13, 2015
· 2 comments
· Fixed by mozilla/addons-server#4430 or drummonds/bene#50
Labels
Comments
@chrkr thanks for reporting this, are you willing to make a PR? |
1 task
Hmm, this causes all kind of trouble when fixing naively. Have to dig deeper. |
This was referenced Jan 18, 2017
This was referenced Oct 10, 2017
This was referenced Oct 30, 2017
This was referenced Nov 18, 2017
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Since the changes in 0.16.0, the default column heading is no longer passed through title() if the value is taken from a model field (field.verbose_name). It is only titlised if the column name is used (because the table is used for a list-of-dictionaries or similar dataset).
The Django convention is to not capitalize the first letter of verbose_name, as Django capitalizes it automatically whenever it is needed. This is for example so that verbose_name can be used in the middle of a sentence without unexpected capitals popping up.
From the django documentation (https://docs.djangoproject.com/en/1.8/topics/db/models/#verbose-field-names):
So, Django convention is that verbose_name should be titlised whenever it is needed, so django-tables2 should in fact titlise the column name if it gets it from field.verbose_name.
The text was updated successfully, but these errors were encountered: