[Django] #22070: Admin index shows mixed lowercase and capitalized app names when using contrib apps and old-style apps

11 views
Skip to first unread message

Django

unread,
Feb 16, 2014, 3:39:51 PM2/16/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
--------------------------------------+--------------------
Reporter: bendavis78 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords: admin
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+--------------------
The base ``AppConfig`` class uses ``self.label.title()`` for verbose_name
if verbose_name is not supplied. The new AppConfigs in ``django.contrib``
use lowercase verbose names. This causes the admin index to look a bit
sloppy when old-style apps are capitalized while new-style apps are all
lowercase.

In my opinion, one of the following changes should be made:

1. All contrib apps should follow the convention for verbose_names used by
the default ``AppConfig``
2. The default ``AppConfig`` should follow the same convention for verbose
name as the contrib apps
3. The admin template should force all app names to use the same title
convention (eg, ``{% verbose_name|title %}``)

I'm in favor of any of these options -- the main goal here is consistency.

--
Ticket URL: <https://code.djangoproject.com/ticket/22070>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 16, 2014, 11:52:40 PM2/16/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage:
Keywords: admin | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* cc: bendavis78 (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:1>

Django

unread,
Feb 17, 2014, 2:13:28 AM2/17/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage:
Keywords: admin app-loading | Unreviewed

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

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

* keywords: admin => admin app-loading


--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:2>

Django

unread,
Mar 3, 2014, 10:53:34 AM3/3/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
--------------------------------------+------------------------------------

Reporter: bendavis78 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin app-loading | Triage Stage: Accepted

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

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

* stage: Unreviewed => Accepted


Old description:

> The base ``AppConfig`` class uses ``self.label.title()`` for verbose_name
> if verbose_name is not supplied. The new AppConfigs in ``django.contrib``
> use lowercase verbose names. This causes the admin index to look a bit
> sloppy when old-style apps are capitalized while new-style apps are all
> lowercase.
>
> In my opinion, one of the following changes should be made:
>
> 1. All contrib apps should follow the convention for verbose_names used
> by the default ``AppConfig``
> 2. The default ``AppConfig`` should follow the same convention for
> verbose name as the contrib apps
> 3. The admin template should force all app names to use the same title
> convention (eg, ``{% verbose_name|title %}``)
>
> I'm in favor of any of these options -- the main goal here is
> consistency.

New description:

The base `AppConfig` class uses `self.label.title()` for verbose_name if
verbose_name is not supplied. The new AppConfigs in `django.contrib` use
lowercase verbose names. This causes the admin index to look a bit sloppy
when old-style apps are capitalized while new-style apps are all
lowercase.

In my opinion, one of the following changes should be made:

1. All contrib apps should follow the convention for verbose_names used by
the default `AppConfig`
2. The default `AppConfig` should follow the same convention for verbose
name as the contrib apps
3. The admin template should force all app names to use the same title

convention (e.g., `{% verbose_name|title %}`)

I'm in favor of any of these options -- the main goal here is consistency.

--

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

Django

unread,
Mar 5, 2014, 2:20:51 PM3/5/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: | jenkinsbr2
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: new => assigned
* cc: jenkinsbr2 (added)
* owner: nobody => jenkinsbr2


--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:4>

Django

unread,
Mar 5, 2014, 8:20:26 PM3/5/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: | jenkinsbr2
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by jenkinsbr2):

This seems like a good ticket for me to get my feet wet with a
contribution. I'd just like to clarify a couple of things and see if my
thinking is correct. Going through listed options, I'd tend to immediately
discard option 2 - seems to me that title case is what we would want here.
At first I thought option 3 would be the most elegant solution, however I
realized that that will not take care of other instances in the page
title, header, and breadcrumbs - do we care about title casing in those
spots? I think the title case is generally nicer looking and of course the
title filter could be added in several locations in the template, but
unnecessary filters cluttering the template seems undesirable. All
considered option 1 seems to be the easiest and most comprehensive change.
My question is: do I simply change each instance of apps.py in
`django.contrib.*` to reflect the correct title cased verbose name? Would
it be more desirable to change the string or to call `.title()` on it?

I appreciate any feedback (and patience with dumb questions!)

--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:5>

Django

unread,
Mar 6, 2014, 3:59:45 AM3/6/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: | jenkinsbr2
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by mjtamlyn):

I think we should change the strings to be title case. Calling `title()`
is a dead end - you might want the string to start with a lower case
letter, eg `"mYk's Gallery"`.

--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:6>

Django

unread,
Mar 6, 2014, 10:41:53 AM3/6/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: | jenkinsbr2
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:7>

Django

unread,
Mar 6, 2014, 6:43:42 PM3/6/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: | jenkinsbr2
Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed

Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ec675ed6ccd1ad80e289dc01275e225552c489a3"]:
{{{
#!CommitTicketReference repository=""
revision="ec675ed6ccd1ad80e289dc01275e225552c489a3"
Fixed #22070 -- Changed verbose_name for apps in django.contrib to use
title case

Thanks bendavis78 for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:8>

Django

unread,
Mar 7, 2014, 5:10:15 AM3/7/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-------------------------------------+-------------------------------------
Reporter: bendavis78 | Owner:
Type: | jenkinsbr2
Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master

Severity: Normal | Resolution: fixed
Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by aaugustin):

I disagree with that commit and I think it must be reverted.

Application names must be lower case for the same reason model names are
lower case.

If templates need an title-cased version, they can title-ize or capitalize
the value.

I've been working on a patch since last week-end and I hope to complete it
this week-end.

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

Django

unread,
Mar 7, 2014, 5:12:40 AM3/7/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-----------------------------------+--------------------------------------
Reporter: bendavis78 | Owner: jenkinsbr2
Type: Bug | Status: new
Component: Core (Other) | Version: master
Severity: Release blocker | Resolution:

Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: closed => new
* component: contrib.admin => Core (Other)
* resolution: fixed =>
* type: Cleanup/optimization => Bug
* severity: Normal => Release blocker


--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:10>

Django

unread,
Mar 9, 2014, 4:25:11 PM3/9/14
to django-...@googlegroups.com
#22070: Admin index shows mixed lowercase and capitalized app names when using
contrib apps and old-style apps
-----------------------------------+--------------------------------------
Reporter: bendavis78 | Owner: jenkinsbr2
Type: Bug | Status: closed

Component: Core (Other) | Version: master
Severity: Release blocker | Resolution: fixed

Keywords: admin app-loading | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* status: new => closed
* resolution: => fixed


Comment:

I changed my mind: https://groups.google.com/d/msg/django-
developers/t3hnHQAhEg8/kdLfb2m1BE8J.

I'll reopen the ticket again if the discussion brings up new ideas.

--
Ticket URL: <https://code.djangoproject.com/ticket/22070#comment:11>

Reply all
Reply to author
Forward
0 new messages