summaryrefslogtreecommitdiffstats
path: root/core/models
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-09-27 00:38:07 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-09-27 00:38:07 +0300
commit0d5297f08c9a629176bbeb9839e8cc9bf80ef3b2 (patch)
tree3e571183ee066b44a702f1cbc442cad848e72865 /core/models
parent9aad95bfd0476dbe7dd2609be2559e53a4fef9e8 (diff)
downloadtroggle-0d5297f08c9a629176bbeb9839e8cc9bf80ef3b2.tar.gz
troggle-0d5297f08c9a629176bbeb9839e8cc9bf80ef3b2.tar.bz2
troggle-0d5297f08c9a629176bbeb9839e8cc9bf80ef3b2.zip
lat/long values now persistent on Entrances
Diffstat (limited to 'core/models')
-rw-r--r--core/models/caves.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index bad3768..883e33c 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -235,7 +235,6 @@ class Entrance(TroggleModel):
bearings = models.TextField(blank=True, null=True)
easting = models.TextField(blank=True, null=True) # apparently? manually entered not calculated
entrance_description = models.TextField(blank=True, null=True)
- exact_station = models.TextField(blank=True, null=True)
explorers = models.TextField(blank=True, null=True)
filename = models.CharField(max_length=200)
findability = models.CharField(max_length=1, choices=FINDABLE_CHOICES, blank=True, null=True)
@@ -250,13 +249,15 @@ class Entrance(TroggleModel):
name = models.CharField(max_length=100, blank=True, null=True)
northing = models.TextField(blank=True, null=True) # apparently? manually entered not calculated
other_description = models.TextField(blank=True, null=True)
- other_station = models.TextField(blank=True, null=True)
photo = models.TextField(blank=True, null=True)
slug = models.SlugField(max_length=50, unique=True, default="default_slug_id")
- tag_station = models.TextField(blank=True, null=True)
underground_description = models.TextField(blank=True, null=True)
url = models.CharField(max_length=300, blank=True, null=True)
+ tag_station = models.TextField(blank=True, null=True)
+ exact_station = models.TextField(blank=True, null=True)
+ other_station = models.TextField(blank=True, null=True)
+
class Meta:
ordering = ["caveandentrance__entranceletter"]
@@ -412,7 +413,7 @@ class Entrance(TroggleModel):
def latlong(self):
"""Gets lat long assuming that it has to get it from the associated stations, but in fact the Entrance itself
- has easting/northing and lat/long fields which perhaps we should try first...
+ has easting/northing and lat/long fields which perhaps we should try first... or last ?!
"""
if self.easting and self.northing:
return utmToLatLng(33, float(self.easting), float(self.northing), northernHemisphere=True)