mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 12:27:05 +00:00
enable non-cave html and images redirection
This commit is contained in:
@@ -18,8 +18,8 @@ from troggle.core.models_caves import Cave
|
||||
import troggle.core.views.caves
|
||||
import troggle.settings as settings
|
||||
|
||||
'''Formerly a separate package 'flatpages' written by Martin Green 2011.
|
||||
This was NOT django.contrib.flatpages which stores HTML in the database, so the name was chnaged to expopages.
|
||||
'''Formerly a separate package called 'flatpages' written by Martin Green 2011.
|
||||
This was NOT django.contrib.flatpages which stores HTML in the database, so the name was changed to expopages.
|
||||
Then it was incorporated into troggle directly, rather than being an unnecessary external package.
|
||||
'''
|
||||
|
||||
@@ -92,7 +92,7 @@ def expowebpage(request, expowebpath, path):
|
||||
'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu})
|
||||
|
||||
def mediapage(request, subpath=None, doc_root=None):
|
||||
'''This is for special prefixe paths /photos/ /site_media/, /static/ etc.
|
||||
'''This is for special prefix paths /photos/ /site_media/, /static/ etc.
|
||||
as defined in urls.py . If given a directory, gives a failure page.
|
||||
'''
|
||||
# print(" - XXXXX_ROOT: {} ...{}".format(doc_root, subpath))
|
||||
@@ -108,6 +108,7 @@ def mediapage(request, subpath=None, doc_root=None):
|
||||
return render(request, 'pagenotfound.html', {'path': subpath})
|
||||
|
||||
|
||||
|
||||
def expopage(request, path):
|
||||
'''Either renders an HTML page from expoweb with all the menus,
|
||||
or serves an unadorned binary file with mime type
|
||||
|
||||
Reference in New Issue
Block a user