summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2024-07-10 13:10:55 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2024-07-10 13:10:55 +0200
commitf5f3adf7da2a84562d2179b2fa2b72117c57a61c (patch)
tree78dd31b7bba2f58efd28bbf00009ea72feb39ca3
parent63ef8c9fb140e304ed1954a7a9a3fa9c9c8bb00a (diff)
downloadtroggle-f5f3adf7da2a84562d2179b2fa2b72117c57a61c.tar.gz
troggle-f5f3adf7da2a84562d2179b2fa2b72117c57a61c.tar.bz2
troggle-f5f3adf7da2a84562d2179b2fa2b72117c57a61c.zip
fixing index.htm as troggle-managed page
-rw-r--r--core/views/expo.py5
-rw-r--r--urls.py1
2 files changed, 6 insertions, 0 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index d0f504d..79d37fe 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -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}")
diff --git a/urls.py b/urls.py
index 24b0cf2..bd39efb 100644
--- a/urls.py
+++ b/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.