mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 22:57:14 +00:00
More public debug reports
This commit is contained in:
@@ -48,20 +48,25 @@ def surveximport(request):
|
||||
"""Page displaying contents of a file produced during data import"""
|
||||
logname = "svxlinear.log"
|
||||
logpath = (Path(settings.PYTHON_PATH, logname))
|
||||
contents = []
|
||||
newlog = []
|
||||
|
||||
if Path(logpath).is_file:
|
||||
with open(logpath, "r") as f:
|
||||
contents = f.readlines()
|
||||
print(f"{logpath} has {len(contents)} entries")
|
||||
contents = f.read()
|
||||
else:
|
||||
print(f"{logpath} NOT FOUND {len(contents)}")
|
||||
|
||||
for line in contents:
|
||||
line = line.replace(" ", " ")
|
||||
newlog.append(line)
|
||||
return render(request, 'survexreport.html', {"log":newlog})
|
||||
return render(request, 'survexreport.html', {"log":contents})
|
||||
|
||||
def survexdebug(request):
|
||||
"""Page displaying contents of a file produced during data import"""
|
||||
logname = "svxblks.log"
|
||||
logpath = (Path(settings.PYTHON_PATH, logname))
|
||||
|
||||
if Path(logpath).is_file:
|
||||
with open(logpath, "r") as f:
|
||||
contents = f.read()
|
||||
else:
|
||||
print(f"{logpath} NOT FOUND {len(contents)}")
|
||||
return render(request, 'survexdebug.html', {"log":contents})
|
||||
|
||||
|
||||
def pathsreport(request):
|
||||
|
||||
Reference in New Issue
Block a user