summaryrefslogtreecommitdiffstats
path: root/core/models/survex.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-08-06 21:27:36 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-08-06 21:27:36 +0300
commit186eb20fb30b387f006791577519dd2734a10b3f (patch)
treec9e01f03fb61fd41dd7218310c94eb13add9e61a /core/models/survex.py
parentac22a984ee84caa683f5baddf0c51a13f22aadc8 (diff)
downloadtroggle-186eb20fb30b387f006791577519dd2734a10b3f.tar.gz
troggle-186eb20fb30b387f006791577519dd2734a10b3f.tar.bz2
troggle-186eb20fb30b387f006791577519dd2734a10b3f.zip
Make drawings repo the MASTER for contents.json
Diffstat (limited to 'core/models/survex.py')
-rw-r--r--core/models/survex.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/models/survex.py b/core/models/survex.py
index 05588f9..de65611 100644
--- a/core/models/survex.py
+++ b/core/models/survex.py
@@ -178,6 +178,15 @@ class Wallet(models.Model):
def get_json(self):
jsonfile = Path(self.fpath, 'contents.json')
+
+ # Get from git repo instead
+ # :drawings: walletjson/2022/2022#01/contents.json
+ # fpath = /mnt/d/EXPO/expofiles/surveyscans/1999/1999#02
+ fp = Path(self.fpath)
+ wname = fp.name
+ wyear = fp.parent.name
+
+ jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json"
if not Path(jsonfile).is_file():
#print(f'{jsonfile} is not a file')
return None