From 460fb678e9722c6668102e61e2807cba23cc5a23 Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 18 Oct 2024 10:24:40 +0200 Subject: [PATCH] settings: improve assert error msg on DOMAIN --- dhub/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhub/settings.py b/dhub/settings.py index b96710e..80d9f3c 100644 --- a/dhub/settings.py +++ b/dhub/settings.py @@ -36,7 +36,7 @@ assert DOMAIN not in [None, ''], "DOMAIN var is MANDATORY" print("DOMAIN: " + DOMAIN) ALLOWED_HOSTS = config('ALLOWED_HOSTS', default=DOMAIN, cast=Csv()) -assert DOMAIN in ALLOWED_HOSTS, "DOMAIN is not ALLOWED_HOST" +assert DOMAIN in ALLOWED_HOSTS, f"DOMAIN ${DOMAIN} is not ALLOWED_HOST ${ALLOWED_HOST}" CSRF_TRUSTED_ORIGINS = config('CSRF_TRUSTED_ORIGINS', default=f'https://{DOMAIN}', cast=Csv())