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:
parent
5b2542c6ed
commit
2e287f3a7f
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue