diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-10-21 22:31:33 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-10-21 22:31:33 +0300 |
commit | 1641dfe5f199e26607e8367395f4f8aa04eb376b (patch) | |
tree | efed94787898f8d395c8a1e8113a369bdd60b0e7 /core/models/logbooks.py | |
parent | e7a0c57330a9c3808531b4d401d0cedf0f0c0638 (diff) | |
download | troggle-1641dfe5f199e26607e8367395f4f8aa04eb376b.tar.gz troggle-1641dfe5f199e26607e8367395f4f8aa04eb376b.tar.bz2 troggle-1641dfe5f199e26607e8367395f4f8aa04eb376b.zip |
tidy with new multicave wallets
Diffstat (limited to 'core/models/logbooks.py')
-rw-r--r-- | core/models/logbooks.py | 16 |
1 files changed, 2 insertions, 14 deletions
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"<body>", "<body>\n" + frontmatter + endmatter, logbookfile) else: logbookfile = re.sub(r"<body>", f"<body>\n<h1>Expo {year}</h1>\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}" |