﻿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
30872	"ManagementUtility.fetch_command prints ""No Django settings specified."" even if they are."	Keryn Knight	Carlton Gibson	"`fetch_command(...)` currently [https://github.com/django/django/blob/7d1bf29977bb368d7c28e7c6eb146db3b3009ae7/django/core/management/__init__.py#L226 does the following]:

{{{
if os.environ.get('DJANGO_SETTINGS_MODULE'):
    # If `subcommand` is missing due to misconfigured settings, the
    # following line will retrigger an ImproperlyConfigured exception
    # (get_commands() swallows the original one) so the user is
    # informed about it.
    settings.INSTALLED_APPS
else:
    sys.stderr.write(""No Django settings specified.\n"")
}}}

which doesn't account for settings being set via a `UserSettingsHolder` by doing `settings.configure(...)`

But the parent `execute` method [https://github.com/django/django/blob/7d1bf29977bb368d7c28e7c6eb146db3b3009ae7/django/core/management/__init__.py#L351 correctly checks]  `if settings.configured:`

I've not checked deeply, but I don't think the intent or outcome depends specifically on the `LazySettings` having been configured via a `Settings` through a named module import, and it would seem that `if settings.configured:` could/should apply here too."	Cleanup/optimization	closed	Core (Management commands)	dev	Normal	fixed			Accepted	1	0	0	0	1	0
