mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
fixing index.htm as troggle-managed page
This commit is contained in:
parent
63ef8c9fb1
commit
f5f3adf7da
@ -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}")
|
||||
|
1
urls.py
1
urls.py
@ -92,6 +92,7 @@ else:
|
||||
|
||||
trogglepatterns = [
|
||||
path('pubs.htm', pubspage, name="pubspage"), # ~165 hrefs to this url in expoweb files
|
||||
#path('', indexpage, name="indexpage"), # ~1,212 hrefs to this url in expoweb files
|
||||
path('index.htm', indexpage, name="indexpage"), # ~1,212 hrefs to this url in expoweb files
|
||||
|
||||
path('expofiles/', include(expofilesurls)), # intercepted by Apache, if it is running.
|
||||
|
Loading…
Reference in New Issue
Block a user