So, we actually want all ModelForms to respect the well-defined
capitalization. We couldn't find anything related in the docs.
How can this be achieved?
--
Ticket URL: <https://code.djangoproject.com/ticket/26497>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0
Comment:
Please see TicketClosingReasons/UseSupportChannels for usage questions.
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:1>
* type: Uncategorized => New feature
Comment:
Would this be a valid ticket if I change its type to "new Feature"?
"Disable capitalization of verbose_name of model fields in forms" ?
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:2>
* cc: tzanke@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:3>
Comment (by timgraham):
Is it the same issue described in https://groups.google.com/d/topic
/django-developers/gaocodgZVAk/discussion?
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:4>
Comment (by srkunze):
Not sure if I understand it all correctly.
We want capfirst(field.verbose_name) deactivated WHEN we specify the
verbose_name in the model field.
However, we don't think that it should be deactivated WHEN the
verbose_name is generated from the field.name.
Does this makes sense? Is that different from the proposal?
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:5>
Comment (by timgraham):
The proposal on the mailing list is to drop all automatic capitalization
in field labels in favor of doing it with CSS, e.g.
{{{
label::first-letter {
text-transform: capitalize;
}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:6>
Comment (by srkunze):
So, it's not entirely what we think is useful.
Not sure if it is a locale-dependent issue, but in German, we actually
like to see capitalized first letters. So, for auto-generated
verbose_names, it's okay.
But when a developer specifies the capitalization himself via the
verbose_name attribute, it should not be changed anymore.
Will have a look at the Sergei's attached patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:7>
Comment (by srkunze):
I did a quick review of the patch and opened PyCharm with a fresh Django
1.9.5 installation.
Maybe I am wrong, but it seems to me that he missed some usages of
capfirst with regards to field names. Not sure if that is intended.
AFAICS, the patch does not distinguish between auto-generated
verbose_name and user-defined verbose_name. So, the patch does not help in
this regard. However, given the patch is applied, we would need to add all
capitalized forms as explicit verbose_names. Not sure if I would like
that; especially when it works so conveniently for the German language but
it would solve the problem at hand.
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:8>
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:9>
Comment (by srkunze):
Do you think it would make sense to separate out these two concepts in
Django?
1) leave user-defined verbose_name of model fields alone
2) let user specify a format string which defines how to auto-generate a
verbose_name of a model field
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:10>
* resolution: invalid => duplicate
Comment:
It'll be better to raise your proposal on the linked mailing list
discussion.
In the absence of the other patch, I don't think it makes sense to remove
auto-capitalization of user-defined verbose names as the existing
convention is to define those as lower-cased strings and rely on Django to
do capitalization as necessary. Of course, sometimes this isn't desired,
but changing it will be backwards-incompatible.
Now that I understand your proposal, I see it's a duplicate of #18129.
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:11>
Comment (by srkunze):
Interesting tone at the other ticket.
Anyway, I think I will try to join that mailing list. I hope I get the
registration right.
I will post my thoughts there. Consider this ticket obsolete.
--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:12>