-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tables overrides model's verbose_name with auto-capitalization #475
Comments
I've be bitten by this too, but it's the way it was when I started maintaining this plugin. I'm open to changing this if there is a more sensible way, but it should be thought through, documented and tested well. If you can, please propose a changes using a PR. |
I think models is for datebase, if you use table for web ,I think you should set label like this "circleName = forms.CharField(label='CircleName', max_length=20)" , I hope can help you
At 2017-08-30 14:33:52, "Simo Paasisalo" <notifications@github.com> wrote:
Hi,
I have some columns in my table that use specified units, for example Amount (mg). I have this defined in the model's verbose_name, and it shows as intended in for example Django Admin. However, in the table it shows as Amount (Mg), with a capitalized M (going from millis to megas :) ). This is also a problem with different translations, since in for example Finnish we don't tend to capitalize each word in headings etc.
I know I could define verbose_name again in the table class, but that would mean double work, and make maintenance a bit more difficult.
Is this behaviour intended? Is there some workaround or configuration that I could use to disable this?
Thanks for an awesome plugin!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
verbose_name argument to model fields is not for the database either: it's used in ModelForms and the admin. django docs on Verbose field names state:
django-tables2 capitalizes every word of the verbose name. This is different from what django does, so changing it to the django default behavior makes sense to me. |
landed in master, I just did a pre-release of 2.0.0 with version 2.0.0a0. Please help by testing and report any issues. |
Hi,
I have some columns in my table that use specified units, for example
Amount (mg)
. I have this defined in the model'sverbose_name
, and it shows as intended in for example Django Admin. However, in the table it shows asAmount (Mg)
, with a capitalized M (going from millis to megas :) ). This is also a problem with different translations, since in for example Finnish we don't tend to capitalize each word in headings etc.I know I could define
verbose_name
again in the table class, but that would mean double work, and make maintenance a bit more difficult.Is this behaviour intended? Is there some workaround or configuration that I could use to disable this?
Thanks for an awesome plugin!
The text was updated successfully, but these errors were encountered: