mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 04:37:17 +00:00
fixing index.htm as troggle-managed page
This commit is contained in:
@@ -138,6 +138,7 @@ def pubspage(request):
|
||||
This is a placeholder, we need to do something like what is done in indexpage() below...
|
||||
"""
|
||||
expowebpath = Path(settings.EXPOWEB)
|
||||
print("--redirecting from pubspage()")
|
||||
return expowebpage(request, expowebpath, "pubs.htm")
|
||||
|
||||
def indexpage(request):
|
||||
@@ -146,6 +147,7 @@ def indexpage(request):
|
||||
This edits the most recent year on the fly..
|
||||
This now works.
|
||||
"""
|
||||
print("--redirecting from indexpage()")
|
||||
subpath = Path(settings.EXPOWEB) / "index00.htm"
|
||||
with open(subpath, "r") as o:
|
||||
html = o.read()
|
||||
@@ -155,6 +157,9 @@ def indexpage(request):
|
||||
|
||||
def expowebpage(request, expowebpath, path):
|
||||
"""Adds menus and serves an HTML page"""
|
||||
if path == "" or path == "index.htm":
|
||||
return indexpage(request)
|
||||
|
||||
if not os.path.isfile(expowebpath / path):
|
||||
# Should not get here if the path has suffix "_edit"
|
||||
print(f" - 404 error in expowebpage() {path}")
|
||||
|
||||
Reference in New Issue
Block a user