Opened 11 years ago

Closed 11 years ago

#21675 closed New feature (fixed)

Provide an AppConfig for contrib apps with a translatable verbose_name

Reported by: Aymeric Augustin Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: app-loading
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

That would make sense if we want to promote the use of AppConfig subclasses in INSTALLED_APPS.

It involves:

  • picking good verbose names in English
  • creating simple AppConfig modules
  • updating the documentation

Change History (5)

comment:1 by Aymeric Augustin, 11 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Aymeric Augustin, 11 years ago

When #21676 is done, we should try to move setup code in AppConfigs too. As is, it won't work for people still using the app name in INSTALLED_APPS, unless we reintroduce some kind of autodiscovery.

comment:3 by Marc Tamlyn, 11 years ago

Setup code should likely by default include admin.site.autodiscover() as this clearly does not belong in a urls.py file.

comment:4 by Aymeric Augustin, 11 years ago

Has patch: set

https://github.com/django/django/pull/2145 creates AppConfig classes for all contrib apps.

The admin will use verbose_name for apps that have models, and admindocs too once #21685 is fixed.

For apps that don't have models, I don't think this change has any effect at this point.

But I included all apps in the patch for consistency. At least we have them if we introduce features that could take advantage of them.

This patch doesn't address the documentation; I don't know how much we want to promote usage of app configs; I'll discuss it on django-developers first. Even if we don't document it at all I think it's worth having these classes.

comment:5 by Aymeric Augustin <aymeric.augustin@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 27afd302c687528ff1dc3156961e409862c6eca2:

Fixed #21675 -- Added app configs for contrib apps.

Note: See TracTickets for help on using tickets.
Back to Top