diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-03-18 03:03:06 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-03-18 03:03:06 +0000 |
commit | 5a90e7b727bd224bea05bbdafe7031c3f4356dc0 (patch) | |
tree | 2cccff99a8974de069e078895980dce3bb633ec8 /core/models | |
parent | d64948749e2f963f1938016764ce8256efd796dd (diff) | |
download | troggle-5a90e7b727bd224bea05bbdafe7031c3f4356dc0.tar.gz troggle-5a90e7b727bd224bea05bbdafe7031c3f4356dc0.tar.bz2 troggle-5a90e7b727bd224bea05bbdafe7031c3f4356dc0.zip |
fix more twiddly variations of QMs
Diffstat (limited to 'core/models')
-rw-r--r-- | core/models/logbooks.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/models/logbooks.py b/core/models/logbooks.py index b594945..361fb96 100644 --- a/core/models/logbooks.py +++ b/core/models/logbooks.py @@ -150,8 +150,8 @@ class QM(TroggleModel): blockname = models.TextField(blank=True, null=True) # NB truncated copy of survexblock name with last char added expoyear = models.CharField(max_length=4, blank=True, null=True) ticked = models.BooleanField(default=False) - location_description = models.TextField(blank=True) - completion_description = models.TextField(blank=True) + location_description = models.TextField(blank=True, null=True) + completion_description = models.TextField(blank=True, null=True) completion_date = models.DateField(blank=True, null=True) nearest_station_name = models.CharField(max_length=200, blank=True, null=True) resolution_station_name = models.CharField(max_length=200, blank=True, null=True) @@ -177,17 +177,17 @@ class QM(TroggleModel): blocknamestr = "" return f"{cavestr}-{expoyearstr}-{self.number}{self.grade}{blocknamestr}" - def get_completion_url(self): - """assumes html file named is in same folder as cave description file - WRONG - needs rewriting!""" - cd = None - if self.completion_description: - try: - dir = Path(self.cave.url).parent - cd = dir / self.completion_description - except: - cd = None - return cd + # def get_completion_url(self): + # """assumes html file named is in same folder as cave description file + # WRONG - needs rewriting!""" + # cd = None + # if self.completion_description: + # try: + # dir = Path(self.cave.url).parent + # cd = dir / self.completion_description + # except: + # cd = None + # return cd def newslug(self): qmslug = f"{str(self.cave)}-{self.expoyear}-{self.blockname}{self.number}{self.grade}" |