summaryrefslogtreecommitdiffstats
path: root/core/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/utils.py')
-rw-r--r--core/utils.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/utils.py b/core/utils.py
index 3dbbd9f..69425ca 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -122,12 +122,15 @@ def make_new_expo(year):
u.save()
def make_new_expo_dir(year):
- t = "<a href='index.html'>index</a><br><a href='mission.html'>mission</a><br><a href='logbook.html'>logbook</a><br>"
+ pages = ["index", "logbook", "mission", "travel"]
+ t = "<hr />"
+ for ff in pages:
+ t += f"<a href='{ff}.html'>{ff}</a><br>\n"
year_dir = Path(settings.EXPOWEB, 'years', year)
if not year_dir.is_dir():
year_dir.mkdir(parents=True, exist_ok=True)
- for ff in ["index","logbook", "mission"]:
- content = f"<html><head><title>{ff}</title></head><body><h1>{ff}</h1>{t}</body></html>"
+ for ff in pages:
+ content = f"<html><head><title>{year} {ff}</title></head><body><h1>{ff}</h1>Add content here.{t}</body></html>"
p = Path(year_dir, ff+".html")
if not p.is_file():
write_and_commit( [(p, content, "utf8")], f"Auto new year {ff} file creation", "Auto New Year <make_new_expo_dir@troggle.expo>")