summaryrefslogtreecommitdiffstats
path: root/core/models_millenial.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/models_millenial.py')
-rw-r--r--core/models_millenial.py33
1 files changed, 25 insertions, 8 deletions
diff --git a/core/models_millenial.py b/core/models_millenial.py
index db893bc..c97be36 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
-from troggle.core.methods_millenial import *
+import troggle.core.methods_millenial as methods_millenial
#
# This file was created in 2019
@@ -37,15 +37,32 @@ 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 decription of the cave
+ description = models.TextField() #holds link to description
+ date = models.TextField() #holds date of last visit
def top_camp_distance(self): #returns distance of this cave from topcamp
- return 0
+ return methods_millenial.top_camp_distance(self.entrance)
def top_camp_bearing(self): #returns bearing to this cave from topcamp in format 235.5 (float north-based azimuth)
- return 0
+ return methods_millenial.top_camp_bearing(self.entrance)
def top_camp_bearing_letter(self): #returns bearing to this cave from topcamp in format e.g. 'NE'
- return 0
- def last_visit(self): #returns Survey class instance of the most recent visit
- return 0
+ 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()
+
+
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
@@ -57,7 +74,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
- title = models.TextField() #contents of the logbook chunk
+ contents = 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