rename TUNNEL_DATA as DRAWINGS_DATA

This commit is contained in:
Philip Sargent
2021-04-26 18:42:10 +01:00
parent bd647b99ec
commit d43ce1bdb2
9 changed files with 19 additions and 19 deletions

View File

@@ -53,7 +53,7 @@ def pathsreport(request):
"SURVEYS_URL" : str( settings.SURVEYS_URL),
"SURVEXPORT" : str( settings.SURVEXPORT),
"THREEDCACHEDIR" : str( settings.THREEDCACHEDIR),
"TUNNEL_DATA" : str( settings.TUNNEL_DATA),
"DRAWINGS_DATA" : str( settings.DRAWINGS_DATA),
"URL_ROOT" : str( settings.URL_ROOT)
}
except:
@@ -90,7 +90,7 @@ def pathsreport(request):
"SURVEYS_URL" : type(settings.SURVEYS_URL),
"SURVEXPORT" : type(settings.SURVEXPORT),
"THREEDCACHEDIR" : type(settings.THREEDCACHEDIR),
"TUNNEL_DATA" : type(settings.TUNNEL_DATA),
"DRAWINGS_DATA" : type(settings.DRAWINGS_DATA),
"URL_ROOT" : type(settings.URL_ROOT)
}
except:

View File

@@ -64,7 +64,7 @@ def dwgfilesingle(request, path):
message = f'Drawing file error or not found \'{path}\' .'
return render(request, 'errors/generic.html', {'message': message})
tfile = Path(settings.TUNNEL_DATA, dwgfile.dwgpath)
tfile = Path(settings.DRAWINGS_DATA, dwgfile.dwgpath)
try: # for display not download
return HttpResponse(content=open(tfile, errors='strict'), content_type="text/xhtml")
except UnicodeDecodeError:
@@ -86,7 +86,7 @@ def dwgfileupload(request, path):
except:
message = f'Drawing file error or not found \'{path}\' .'
return render(request, 'errors/generic.html', {'message': message})
tfile = Path(settings.TUNNEL_DATA, dwgfile.dwgpath)
tfile = Path(settings.DRAWINGS_DATA, dwgfile.dwgpath)
project, user, password, tunnelversion = request.POST["tunnelproject"], request.POST["tunneluser"], request.POST["tunnelpassword"], request.POST["tunnelversion"]
print(project, user, tunnelversion)