diff options
| author | Max Nanis | 2026-09-15 14:20:51 +0000 |
|---|---|---|
| committer | Max Nanis | 2026-09-15 14:20:51 +0000 |
| commit | bb1e97218e60bb12b453fadf9ea66e2423f6876f (patch) | |
| tree | 0577506465bf7c9708a1d12ed5f23305679fb2c2 | |
| parent | bb999c73ab563b27e469fc4f74a5f81a5f35fffd (diff) | |
| parent | 4beb76f922d5aa7e0c315d9b2cc13f91ac2769ce (diff) | |
| download | amt-jb-bb1e97218e60bb12b453fadf9ea66e2423f6876f.tar.gz amt-jb-bb1e97218e60bb12b453fadf9ea66e2423f6876f.zip | |
Merges pull request #4
pull manifest master from cdn directory
| -rw-r--r-- | jb/settings.py | 15 |
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): |
