Show warnings on start -l if settings contains production-unsafe values. Resolves #1732

This commit is contained in:
Griatch 2019-09-23 23:22:56 +02:00
parent 70da95ef68
commit 37452e2a43
3 changed files with 18 additions and 7 deletions

View file

@ -85,7 +85,12 @@ def check_errors(settings):
def check_warnings(settings):
"""
Check deprecations that should produce warnings but which
Check conditions and deprecations that should produce warnings but which
does not stop launch.
"""
pass
if settings.DEBUG:
print(" [Devel: settings.DEBUG is True. Important to turn off in production.]")
if settings.IN_GAME_ERRORS:
print(" [Devel: settings.IN_GAME_ERRORS is True. Turn off in production.]")
if settings.ALLOWED_HOSTS == ["*"]:
print(" [Devel: settings.ALLOWED_HOSTS set to '*' (all). Limit in production.]")