aboutsummaryrefslogtreecommitdiff
path: root/jb/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'jb/settings.py')
-rw-r--r--jb/settings.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/jb/settings.py b/jb/settings.py
index 1bf65bc..c57fdf2 100644
--- a/jb/settings.py
+++ b/jb/settings.py
@@ -20,9 +20,20 @@ BASE_HTML = BASE_HTML_PATH.read_text()
MANIFEST_PATH = Path(BASE_DIR) / "jb-ui" / "dist/.vite/manifest.json"
+MANIFEST_PATHS = [
+ Path("/var/www/amt-jb-cdn") / "manifest-master.json",
+ Path(BASE_DIR) / "jb-ui" / "dist/manifest.json",
+]
+
+
def load_manifest():
- with open(MANIFEST_PATH) as f:
- return json.load(f)
+ for path in MANIFEST_PATHS:
+ if path.exists():
+ with open(path) as f:
+ return json.load(f)
+ raise FileNotFoundError(
+ f"No manifest found in any of: {[str(p) for p in MANIFEST_PATHS]}"
+ )
class Settings(GRLBaseSettings):