mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-16 22:07:03 +00:00
Add new survex import report
This commit is contained in:
@@ -21,8 +21,12 @@ from troggle.parsers.people import (GetPersonExpeditionNameLookup,
|
||||
foreign_friends)
|
||||
|
||||
#from django.views.generic.list import ListView
|
||||
'''Very simple report pages summarizing data about the whole set of expeditions and of
|
||||
the status of data inconsistencies
|
||||
'''
|
||||
|
||||
def therionissues(request):
|
||||
"""Page displaying contents of a file produced during data import"""
|
||||
logname = "therionrefs.log"
|
||||
logpath = (Path(settings.PYTHON_PATH, logname))
|
||||
therionlog = []
|
||||
@@ -40,11 +44,29 @@ def therionissues(request):
|
||||
newlog.append(line)
|
||||
return render(request, 'therionreport.html', {"therionlog":newlog})
|
||||
|
||||
'''Very simple report pages summarizing data about the whole set of expeditions and of
|
||||
the status of data inconsistencies
|
||||
'''
|
||||
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")
|
||||
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})
|
||||
|
||||
|
||||
def pathsreport(request):
|
||||
"""The CONSTANTs declared in the settings and localsettings and how they have
|
||||
been evaluated for this specific installation - live """
|
||||
pathsdict = OrderedDict()
|
||||
try:
|
||||
pathsdict = {
|
||||
|
||||
Reference in New Issue
Block a user