summaryrefslogtreecommitdiffstats
path: root/core/models
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2022-07-29 20:55:19 +0300
committerPhilip Sargent <philip.sargent@klebos.com>2022-07-29 20:55:19 +0300
commit724234949f1770645b0f8c34221ae16b0615daf3 (patch)
tree993925a8f13becd0a4acbd1ed3abda679973c959 /core/models
parentbc3da1182bf82ce59b0195ea0496ca123c544438 (diff)
downloadtroggle-724234949f1770645b0f8c34221ae16b0615daf3.tar.gz
troggle-724234949f1770645b0f8c34221ae16b0615daf3.tar.bz2
troggle-724234949f1770645b0f8c34221ae16b0615daf3.zip
Populate blank wallet fields with survex data
Diffstat (limited to 'core/models')
-rw-r--r--core/models/survex.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/models/survex.py b/core/models/survex.py
index d8a5fb5..79a645e 100644
--- a/core/models/survex.py
+++ b/core/models/survex.py
@@ -191,6 +191,7 @@ class Wallet(models.Model):
return waldata
+ # Yes this is horribly, horribly inefficient, esp. for a page that have date, people and cave in it
def date(self):
jsondata = self.get_json()
return jsondata["date"]
@@ -199,12 +200,16 @@ class Wallet(models.Model):
jsondata = self.get_json()
return jsondata["people"]
+ def cave(self):
+ jsondata = self.get_json()
+ return jsondata["cave"]
+
def name(self):
jsondata = self.get_json()
return jsondata["name"]
def __str__(self):
- return str(self.walletname) + " (Wallet)"
+ return "[" + str(self.walletname) + " (Wallet)]"
class SingleScan(models.Model):
ffile = models.CharField(max_length=200)