Add warning when the MEDIA_URL is wrong

Fixes #343
This commit is contained in:
Andrew Godwin 2023-01-01 10:46:06 -07:00
parent 1e54a0b2be
commit 43ba09a16e

View file

@ -400,6 +400,10 @@ if SETUP.MEDIA_BACKEND:
raise ValueError(
"You must provide MEDIA_ROOT and MEDIA_URL for a local media backend"
)
if "://" not in MEDIA_URL and not DEBUG:
raise ValueError(
"The MEDIA_URL setting must start with https://your-domain"
)
else:
raise ValueError(f"Unsupported media backend {parsed.scheme}")