mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 13:18:15 +00:00
bugfixes and more comments
This commit is contained in:
@@ -71,8 +71,14 @@ def map(request):
|
||||
def mapfile(request, path):
|
||||
"""Serves unadorned file: everything in the /map/... folder tree"""
|
||||
fn = Path(settings.EXPOWEB, "map", path)
|
||||
print(f"MAP cuttout. \n{path=}\n{fn=} mime:{getmimetype(fn)}")
|
||||
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))
|
||||
if fn.is_file():
|
||||
print(f"MAP cuttout. \n{path=}\n{fn=} mime:{getmimetype(fn)}")
|
||||
return HttpResponse(content=open(fn, "r"), content_type=getmimetype(fn))
|
||||
else:
|
||||
message = f"### File not found ### {fn}"
|
||||
print(message)
|
||||
return render(request, "errors/generic.html", {"message": message})
|
||||
|
||||
|
||||
|
||||
def expofilessingle(request, filepath):
|
||||
|
||||
Reference in New Issue
Block a user