2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-16 22:47:03 +00:00

Make maps an 'unvarnished' url

This commit is contained in:
2023-11-08 22:53:30 +02:00
parent ca289afe68
commit 08c56644eb
3 changed files with 20 additions and 5 deletions

View File

@@ -60,13 +60,13 @@ def spider(request, _):
return redirect("/?#") # so that suffixes applied by spider are no longer part of the url
def map(request):
"""Serves unadorned the expoweb/map/map.html file"""
fn = Path(settings.EXPOWEB, "map", "map.html")
"""Serves unadorned the expoweb/map/slippy/map.html file"""
fn = Path(settings.EXPOWEB, "map", "slippy", "map.html")
return HttpResponse(content=open(fn, "r"), content_type="text/html")
def mapfile(request, path):
"""Serves unadorned file"""
"""Serves unadorned file: everything in the /map/... folder tree"""
fn = Path(settings.EXPOWEB, "map", path)
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))