﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25356	startapp template mustn't encourage using default_app_config	Aymeric Augustin	Aymeric Augustin	"I just noticed that `startapp` now generates an `apps.py`. This isn't unreasonable. However it also sets `default_app_config` in `__init__.py`. I have strong doubts about this.

`default_app_config` is an ugly API that I included reluctantly for one targeted use-case: allowing pre-existing pluggable apps to take advantage of app config functionality in a backwards-compatible fashion, that is, without requiring projets to upgrade their `INSTALLED_APPS` settings. The first use of this feature was in `django.contrib.admin` in order to get rid of `admin.autodiscover()` in `urls.py`.

Relying implicitly on a default app config if one exists is clearly a bad practice. The good practice is to specifiy explicitly the full path to the `AppConfig` class in `INSTALLED_APPS`.

I recommend to:

- remove this line from `app_template/__init__.py`
- promote explicit configuration of app configs in `INSTALLED_APPS`
- clarify the docs of `default_app_config` with the information I described above"	Bug	closed	Core (Management commands)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
