diff options
author | Sam Wenham <sam@wenhams.co.uk> | 2019-03-04 19:39:43 +0000 |
---|---|---|
committer | Sam Wenham <sam@wenhams.co.uk> | 2019-03-04 19:39:43 +0000 |
commit | e01507d54112cfc61748eeff27a3a264e1ad7516 (patch) | |
tree | 78feffcf35678d76afb7b2e9929f3c4eb2ac993a /core/models_millenial.py | |
parent | b505a26ce4111c23842e3593c1b6e7f78e06e0ec (diff) | |
download | troggle-e01507d54112cfc61748eeff27a3a264e1ad7516.tar.gz troggle-e01507d54112cfc61748eeff27a3a264e1ad7516.tar.bz2 troggle-e01507d54112cfc61748eeff27a3a264e1ad7516.zip |
Backed out changeset: f23440eb11a3
Diffstat (limited to 'core/models_millenial.py')
-rw-r--r-- | core/models_millenial.py | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/core/models_millenial.py b/core/models_millenial.py index c97be36..db893bc 100644 --- a/core/models_millenial.py +++ b/core/models_millenial.py @@ -1,7 +1,7 @@ from django.db import models from django.conf import settings -import troggle.core.methods_millenial as methods_millenial +from troggle.core.methods_millenial import * # # This file was created in 2019 @@ -37,32 +37,15 @@ class CaveM(models.Model): #instance of this class corresponds to one 'thing' th survex_file = models.TextField() #gives path to top level survex file total_length = models.FloatField() #holds total length of this cave (as given by cavern) total_depth = models.FloatField() #holds total depth of this cave (as given by cavern) - description = models.TextField() #holds link to description - date = models.TextField() #holds date of last visit + description = models.TextField() #holds decription of the cave def top_camp_distance(self): #returns distance of this cave from topcamp - return methods_millenial.top_camp_distance(self.entrance) + return 0 def top_camp_bearing(self): #returns bearing to this cave from topcamp in format 235.5 (float north-based azimuth) - return methods_millenial.top_camp_bearing(self.entrance) + return 0 def top_camp_bearing_letter(self): #returns bearing to this cave from topcamp in format e.g. 'NE' - return methods_millenial.top_camp_bearing_letter(self.entrance) - def lat_lon_entrance(self): #lat_lon entrance location - return methods_millenial.lat_lon_entrance(self.entrance) - - -class Cave_descriptionM(models.Model): #instance of this class corresponds to each of the .html files in descriptions - #each of those holds one XML field - slug = models.TextField() - explorers = models.TextField() - underground_description = models.TextField() - equipment = models.TextField() - references = models.TextField() - survey = models.TextField() - kataster_status = models.TextField() - underground_centre_line = models.TextField() - survex_file = models.TextField() #as given in .html file - notes = models.TextField() - - + return 0 + def last_visit(self): #returns Survey class instance of the most recent visit + return 0 class ExpeditionM(models.Model): #instance of this class corresponds to one expo (usually one year) date = models.CharField(max_length=100) #date in format YYYY.MM.DD-YYYY.MM.DD @@ -74,7 +57,7 @@ class SurveyM(models.Model): #instance of this class corresponds to one .svx fil class Logbook_entryM(models.Model): #instance of this class corresponds to one bit of logbook (c.f. expo.survex.com/years/2015/logbook.html or simil) date = models.CharField(max_length=100) #date as typed into logbook - contents = models.TextField() #contents of the logbook chunk + title = models.TextField() #contents of the logbook chunk class Parser_messageM(models.Model): #instance of this class contains one error or warining message produce by any of the parsers parsername = models.CharField(max_length = 20) #name of parser |