diff options
author | Martin Green <martin.speleo@gmail.com> | 2022-06-24 21:58:00 +0100 |
---|---|---|
committer | Martin Green <martin.speleo@gmail.com> | 2022-06-24 21:58:00 +0100 |
commit | 5ac2e24cc2c5ab5f2aeb51f9e786fd3036205b20 (patch) | |
tree | e0e4f035449a7474fea861b42b8ac59f5c1b009a /core/views/expo.py | |
parent | 7db7c6706517e32f7186f5af50f431288e422686 (diff) | |
download | troggle-5ac2e24cc2c5ab5f2aeb51f9e786fd3036205b20.tar.gz troggle-5ac2e24cc2c5ab5f2aeb51f9e786fd3036205b20.tar.bz2 troggle-5ac2e24cc2c5ab5f2aeb51f9e786fd3036205b20.zip |
Removed jQuery
Diffstat (limited to 'core/views/expo.py')
-rw-r--r-- | core/views/expo.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/views/expo.py b/core/views/expo.py index 05f9499..55a34be 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -175,6 +175,7 @@ def expowebpage(request, expowebpath, path): if menumatch: has_menu = True + #Determine which caves this page relates to m = re.search(r"(162\d\/[^\/]+)[\/\.]", path, re.DOTALL + re.IGNORECASE) if m: path_start, = m.groups() @@ -182,9 +183,19 @@ def expowebpage(request, expowebpath, path): else: parent_caves = None + #Determine if this page relates to a particular year + m = re.search(r"years\/(\d\d\d\d)\/.*", path, re.DOTALL + re.IGNORECASE) + if m: + year, = m.groups() + else: + year = None + + #Determine if this page is part of the handbook handbook = path.startswith("handbook") + return render(request, 'expopage.html', {'editable': editable, 'path': path, 'title': title, - 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, 'handbook': handbook, 'parent_caves': parent_caves}) + 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, + 'year': year,'handbook': handbook, 'parent_caves': parent_caves}) def mediapage(request, subpath=None, doc_root=None): '''This is for special prefix paths /photos/ /site_media/, /static/ etc. |