diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-03-16 21:06:52 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-03-16 21:06:52 +0000 |
commit | 3011e7b11428558360ba2718b8e3d9947607b992 (patch) | |
tree | 27a2180936d7f767cfabdffbf9cdc82ad0100bd2 /core/models/logbooks.py | |
parent | 98066591dacdffb4ff33d30bc1cd341bc6f3f229 (diff) | |
download | troggle-3011e7b11428558360ba2718b8e3d9947607b992.tar.gz troggle-3011e7b11428558360ba2718b8e3d9947607b992.tar.bz2 troggle-3011e7b11428558360ba2718b8e3d9947607b992.zip |
Adding QM JSON export
Diffstat (limited to 'core/models/logbooks.py')
-rw-r--r-- | core/models/logbooks.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/models/logbooks.py b/core/models/logbooks.py index 5f83059..fbe7e49 100644 --- a/core/models/logbooks.py +++ b/core/models/logbooks.py @@ -141,6 +141,9 @@ class QM(TroggleModel): All the stuff handling TICK QMs is INCOMPLETE """ + number = models.IntegerField( + help_text="this is the sequential number in the year, only unique for CSV imports", + ) cave = models.ForeignKey("Cave", related_name="QMs", blank=True, null=True, on_delete=models.SET_NULL) block = models.ForeignKey("SurvexBlock", null=True, on_delete=models.SET_NULL) # only for QMs from survex files blockname = models.TextField(blank=True, null=True) # NB truncated copy of survexblock name with last char added @@ -156,9 +159,7 @@ class QM(TroggleModel): ticked_off_by = models.ForeignKey( LogbookEntry, related_name="QMs_ticked_off", blank=True, null=True, on_delete=models.SET_NULL ) # unused, ever?! - number = models.IntegerField( - help_text="this is the sequential number in the year, only unique for CSV imports", - ) + GRADE_CHOICES = ( ("A", "A: Large obvious lead"), ("B", "B: Average lead"), @@ -170,7 +171,8 @@ class QM(TroggleModel): grade = models.CharField(max_length=1, choices=GRADE_CHOICES) location_description = models.TextField(blank=True) nearest_station_description = models.CharField(max_length=400, blank=True, null=True) - nearest_station_name = models.CharField(max_length=200, blank=True, null=True) + nearest_station_name = models.CharField(max_length=200, blank=True, null=True) + resolution_station_name = models.CharField(max_length=200, blank=True, null=True) nearest_station = models.ForeignKey("SurvexStation", blank=True, null=True, on_delete=models.SET_NULL) area = models.CharField(max_length=100, blank=True, null=True) completion_description = models.TextField(blank=True, null=True) |