Add warning on unset SERVER_HOSTNAME
This commit is contained in:
parent
063c44f38d
commit
d2a69739d7
1 changed files with 4 additions and 0 deletions
|
|
@ -150,6 +150,10 @@ def check_warnings(settings):
|
||||||
print(" [Devel: settings.IN_GAME_ERRORS is True. Turn off in production.]")
|
print(" [Devel: settings.IN_GAME_ERRORS is True. Turn off in production.]")
|
||||||
if settings.ALLOWED_HOSTS == ["*"]:
|
if settings.ALLOWED_HOSTS == ["*"]:
|
||||||
print(" [Devel: settings.ALLOWED_HOSTS set to '*' (all). Limit in production.]")
|
print(" [Devel: settings.ALLOWED_HOSTS set to '*' (all). Limit in production.]")
|
||||||
|
if settings.SERVER_HOSTNAME == "localhost":
|
||||||
|
print(" [Devel: settings.SERVER_HOSTNAME is set to 'localhost'. "
|
||||||
|
"Update to the actual hostname in production.]")
|
||||||
|
|
||||||
for dbentry in settings.DATABASES.values():
|
for dbentry in settings.DATABASES.values():
|
||||||
if "psycopg" in dbentry.get("ENGINE", ""):
|
if "psycopg" in dbentry.get("ENGINE", ""):
|
||||||
print(
|
print(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue