[Django] #26497: No Capitalization of verbose_name of model fields when Rendered by BoundField

47 views
Skip to first unread message

Django

unread,
Apr 13, 2016, 7:10:30 AM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-------------------------------+--------------------
Reporter: srkunze | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
When designing a new model, we named all fields as intended and correct
capitalization using the verbose_name property.

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.

Django

unread,
Apr 13, 2016, 8:34:01 AM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-------------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: Uncategorized | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* 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>

Django

unread,
Apr 13, 2016, 8:47:39 AM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by srkunze):

* 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>

Django

unread,
Apr 13, 2016, 8:52:34 AM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by TZanke):

* cc: tzanke@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:3>

Django

unread,
Apr 13, 2016, 10:22:32 AM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Django

unread,
Apr 13, 2016, 12:00:08 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Django

unread,
Apr 13, 2016, 1:09:53 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Django

unread,
Apr 13, 2016, 1:14:06 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Django

unread,
Apr 13, 2016, 1:22:31 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of verbose_name of model fields when Rendered by
BoundField
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Django

unread,
Apr 13, 2016, 1:42:07 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of user-defined verbose_names of model fields
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/26497#comment:9>

Django

unread,
Apr 13, 2016, 1:43:41 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of user-defined verbose_names of model fields
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Django

unread,
Apr 13, 2016, 2:39:50 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of user-defined verbose_names of model fields
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by timgraham):

* 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>

Django

unread,
Apr 13, 2016, 3:50:57 PM4/13/16
to django-...@googlegroups.com
#26497: No Capitalization of user-defined verbose_names of model fields
-----------------------------+--------------------------------------
Reporter: srkunze | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 1.8
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages