mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 17:17:07 +00:00
Fix SurvexDirectory import
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user