mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 15:21:52 +00:00
refactorisation to make debugging easier
This commit is contained in:
parent
41dfe08d2a
commit
6bcf70bb8b
@ -223,7 +223,9 @@ def expopage(request, path):
|
||||
filetobeopened = os.path.normpath(expowebpath / path)
|
||||
|
||||
try:
|
||||
return HttpResponse(content=open(unicode(filetobeopened, 'utf8'), "rb"), content_type=getmimetype(path))
|
||||
content = open(filetobeopened, "rb"
|
||||
content_type=getmimetype(path)
|
||||
return HttpResponse(content = content, content_type=content_type)
|
||||
except IOError:
|
||||
return render(request, 'pagenotfound.html', {'path': path}, status="404")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user