1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 11:16:47 +00:00

fix(settings): translations load from any working directory

LOCALE_PATHS was the relative "locale/": a manage.py or cron run outside
the checkout found no catalogs and fell back to English. It is now under
BASE_DIR. Reading data/secret_key also catches only OSError instead of
any exception.
This commit is contained in:
catborise 2026-11-06 11:01:44 +03:00
parent 5b2542c6ed
commit 2e287f3a7f

View file

@ -23,7 +23,7 @@ if not SECRET_KEY:
if secret_file.exists():
try:
SECRET_KEY = secret_file.read_text().strip()
except Exception:
except OSError:
pass
DEBUG = False
@ -242,7 +242,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LOCALE_PATHS = [
"locale/",
BASE_DIR / "locale",
]
# Resolve the application log path and make sure its directory exists, so a