This commit is contained in:
Martin Green 2022-06-19 01:41:48 +01:00
parent 86b24c9dfe
commit e33ce724c0

View File

@ -123,7 +123,7 @@ def expofilesdir(request, dirpath, filepath):
def expowebpage(request, expowebpath, path): def expowebpage(request, expowebpath, path):
'''Adds menus and serves an HTML page '''Adds menus and serves an HTML page
''' '''
if not Path(expowebpath / path.encode(sysdefaultencoding)).is_file(): if not Path(expowebpath / path).is_file():
# Should not get here if the path has suffix "_edit" # Should not get here if the path has suffix "_edit"
print(f' - 404 error in expowebpage() {path}') print(f' - 404 error in expowebpage() {path}')
return render(request, 'pagenotfound.html', {'path': path}, status="404") return render(request, 'pagenotfound.html', {'path': path}, status="404")