mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
Style the settings error message
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
This commit is contained in:
parent
78a85f814b
commit
7adde65e56
@ -255,7 +255,7 @@ class ManagementUtility:
|
|||||||
app_name = commands[subcommand]
|
app_name = commands[subcommand]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if os.environ.get("DJANGO_SETTINGS_MODULE") and self.settings_exception:
|
if os.environ.get("DJANGO_SETTINGS_MODULE") and self.settings_exception:
|
||||||
sys.stderr.write(str(self.settings_exception) + "\n")
|
sys.stderr.write(self.style.NOTICE(str(self.settings_exception) + "\n"))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
elif not settings.configured:
|
elif not settings.configured:
|
||||||
sys.stderr.write("No Django settings specified.\n")
|
sys.stderr.write("No Django settings specified.\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user