2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 09:57:22 +00:00

comments and tidy

This commit is contained in:
2023-11-03 16:54:29 +02:00
parent c7cb8ece2e
commit fc60bde3ec
4 changed files with 11 additions and 66 deletions

View File

@@ -32,7 +32,7 @@ todo = """
- Can we rewrite things to eliminate the CaveSlug and objects? Surely
foreign keys work fine ?!
- Why do we have CaveAndEntrance objects ?
- Why do we have CaveAndEntrance objects ? These do not need to be explcit for a many:many relationship these days
- move the aliases list from the code and put into an editable file
@@ -112,12 +112,12 @@ class Cave(TroggleModel):
def get_absolute_url(self):
# we do not use URL_ROOT any more.
if self.kataster_number:
pass
elif self.unofficial_number:
pass
else:
self.official_name.lower()
# if self.kataster_number:
# pass
# elif self.unofficial_number:
# pass
# else:
# self.official_name.lower()
return self.url # not good Django style? NEEDS actual URL
def url_parent(self):
@@ -199,6 +199,8 @@ class Cave(TroggleModel):
return res
def writeDataFile(self):
"""Seems to be a duplicate of file_output() ?!
REFACTOR"""
filepath = os.path.join(settings.CAVEDESCRIPTIONS, self.filename)
t = loader.get_template("dataformat/cave.xml")