summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/models_survex.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/core/models_survex.py b/core/models_survex.py
index 89fe4a4..4f53993 100644
--- a/core/models_survex.py
+++ b/core/models_survex.py
@@ -16,8 +16,9 @@ class SurvexDirectory(models.Model):
class Meta:
ordering = ('id',)
- def __str__(self):
- return "[SurvexDirectory:"+str(self.path) + "-" + str(self.primarysurvexfile.path) + "-" + str(self.cave)+"]"
+ # Don't change from the default as that breaks troggle webpages and internal referencing!
+ # def __str__(self):
+ # return "[SurvexDirectory:"+str(self.path) + "-" + str(self.primarysurvexfile.path) + "-" + str(self.cave)+"]"
@@ -29,8 +30,9 @@ class SurvexFile(models.Model):
class Meta:
ordering = ('id',)
- def __str__(self):
- return "[SurvexFile:"+str(self.path) + "-" + str(self.survexdirectory) + "-" + str(self.cave)+"]"
+ # Don't change from the default as that breaks troggle webpages and internal referencing!
+ # def __str__(self):
+ # return "[SurvexFile:"+str(self.path) + "-" + str(self.survexdirectory) + "-" + str(self.cave)+"]"
def exists(self):
fname = os.path.join(settings.SURVEX_DATA, self.path + ".svx")
@@ -117,10 +119,15 @@ class SurvexBlock(models.Model):
class Meta:
ordering = ('id',)
+ # Don't change from the original as that breaks troggle webpages and internal referencing!
+ # def __str__(self):
+ # return "[SurvexBlock:"+ str(self.name) + "-path:" + \
+ # str(self.survexpath) + "-cave:" + \
+ # str(self.cave) + "]"
def __str__(self):
- return "[SurvexBlock:"+ str(self.name) + "-path:" + \
- str(self.survexpath) + "-cave:" + \
- str(self.cave) + "]"
+ return self.name and str(self.name) or 'no name'
+
+
def isSurvexBlock(self): # Function used in templates