2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-01-19 09:22:32 +00:00
This commit is contained in:
Philip Sargent 2021-04-16 21:29:32 +01:00
parent fa1df39923
commit eca0bcc6d8

View File

@ -54,6 +54,18 @@ def expofiles_redirect(request, path):
'''
return redirect(urljoin('http://expo.survex.com/expofiles/', path))
def map(request):
'''Serves unadorned the expoweb/map/map.html file
'''
fn = Path(settings.EXPOWEB, 'map', 'map.html')
return HttpResponse(content=open(fn, "r"),content_type='text/html')
def mapfile(request, path):
'''Serves unadorned file
'''
fn = Path(settings.EXPOWEB, 'map', path)
return HttpResponse(content=open(fn, "r"),content_type=getmimetype(fn))
def expofilessingle(request, filepath):
'''sends a single binary file to the user, if not found, show the parent directory
If the path actually is a directory, then show that.