mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 19:27:11 +00:00
try coverting path from utf8
This commit is contained in:
@@ -223,7 +223,7 @@ def expopage(request, path):
|
||||
filetobeopened = os.path.normpath(expowebpath / path)
|
||||
|
||||
try:
|
||||
return HttpResponse(content=open(filetobeopened, "rb"), content_type=getmimetype(path))
|
||||
return HttpResponse(content=open(unicode(filetobeopened, 'utf8'), "rb"), content_type=getmimetype(path))
|
||||
except IOError:
|
||||
return render(request, 'pagenotfound.html', {'path': path}, status="404")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user