From 1641dfe5f199e26607e8367395f4f8aa04eb376b Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 21 Oct 2023 22:31:33 +0300 Subject: tidy with new multicave wallets --- core/models/logbooks.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'core/models/logbooks.py') diff --git a/core/models/logbooks.py b/core/models/logbooks.py index 4f29bb3..1ffe55d 100644 --- a/core/models/logbooks.py +++ b/core/models/logbooks.py @@ -45,8 +45,8 @@ class LogbookEntry(TroggleModel): date = ( models.DateField() - ) # MJG wants to turn this into a datetime such that multiple Logbook entries on the same day can be ordered.ld() - expedition = models.ForeignKey(Expedition, blank=True, null=True, on_delete=models.CASCADE) # yes this is double- + ) + expedition = models.ForeignKey(Expedition, blank=True, null=True, on_delete=models.CASCADE) title = models.CharField(max_length=200) cave_slug = models.SlugField(max_length=50, blank=True, null=True) place = models.CharField( @@ -146,7 +146,6 @@ def writelogbook(year, filename): logbookfile = re.sub(r"", "\n" + frontmatter + endmatter, logbookfile) else: logbookfile = re.sub(r"", f"\n

Expo {year}

\n" + endmatter, logbookfile) - # print(" - frontmatter opened") dir = Path(settings.EXPOWEB) / "years" / str(year) filepath = Path(dir, filename) @@ -253,17 +252,6 @@ 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 newslug(self): qmslug = f"{str(self.cave)}-{self.expoyear}-{self.blockname}{self.number}{self.grade}" -- cgit v1.2.3