mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-03-24 11:11:49 +00:00
type data added to report
This commit is contained in:
parent
2fe2c0515f
commit
65be64c756
@ -53,29 +53,65 @@ def pathsreport(request):
|
|||||||
"URL_ROOT" : str( settings.URL_ROOT)
|
"URL_ROOT" : str( settings.URL_ROOT)
|
||||||
}
|
}
|
||||||
except:
|
except:
|
||||||
pathsdict["! EXCEPTION !"] = "missing string constant in troggle/settings"
|
pathsdict["! EXCEPTION !"] = "missing or exta string constant in troggle/settings"
|
||||||
|
|
||||||
|
pathstype = OrderedDict()
|
||||||
|
try:
|
||||||
|
pathstype = {
|
||||||
|
# "BOGUS" : type(settings.BOGUS),
|
||||||
|
"JSLIB_URL" : type(settings.JSLIB_URL),
|
||||||
|
# "CSSLIB_URL" : type(settings.CSSLIB_URL),
|
||||||
|
"CAVEDESCRIPTIONS" : type(settings.CAVEDESCRIPTIONS),
|
||||||
|
"DIR_ROOT" : type(settings.DIR_ROOT),
|
||||||
|
"ENTRANCEDESCRIPTIONS" : type(settings.ENTRANCEDESCRIPTIONS),
|
||||||
|
"EXPOUSER_EMAIL" : type(settings.EXPOUSER_EMAIL),
|
||||||
|
"EXPOUSERPASS" : type(settings.EXPOUSERPASS),
|
||||||
|
"EXPOUSER" : type(settings.EXPOUSER),
|
||||||
|
"EXPOWEB" : type(settings.EXPOWEB),
|
||||||
|
"EXPOWEB_URL" : type(settings.EXPOWEB_URL),
|
||||||
|
"FILES" : type(settings.FILES),
|
||||||
|
"LOGFILE" : type(settings.LOGFILE),
|
||||||
|
"LOGIN_REDIRECT_URL" : type(settings.LOGIN_REDIRECT_URL),
|
||||||
|
"MEDIA_ROOT" : type(settings.MEDIA_ROOT),
|
||||||
|
"MEDIA_URL" : type(settings.MEDIA_URL),
|
||||||
|
"PHOTOS_URL" : type(settings.PHOTOS_URL),
|
||||||
|
"PYTHON_PATH" : type(settings.PYTHON_PATH),
|
||||||
|
"REPOS_ROOT_PATH" : type(settings.REPOS_ROOT_PATH),
|
||||||
|
"ROOT_URLCONF" : type(settings.ROOT_URLCONF),
|
||||||
|
"STATIC_URL" : type(settings.STATIC_URL),
|
||||||
|
"SURVEX_DATA" : type(settings.SURVEX_DATA),
|
||||||
|
"SURVEY_SCANS" : type(settings.SURVEY_SCANS),
|
||||||
|
"SURVEYS" : type(settings.SURVEYS),
|
||||||
|
"SURVEYS_URL" : type(settings.SURVEYS_URL),
|
||||||
|
"SURVEXPORT" : type(settings.SURVEXPORT),
|
||||||
|
"THREEDCACHEDIR" : type(settings.THREEDCACHEDIR),
|
||||||
|
"TUNNEL_DATA" : type(settings.TUNNEL_DATA),
|
||||||
|
"URL_ROOT" : type(settings.URL_ROOT)
|
||||||
|
}
|
||||||
|
except:
|
||||||
|
pathstype["! EXCEPTION !"] = "missing or exta string constant in troggle/settings"
|
||||||
|
|
||||||
# settings are unique by paths are not
|
# settings are unique by paths are not
|
||||||
ncodes = len(pathsdict)
|
ncodes = len(pathsdict)
|
||||||
bycodeslist = sorted(pathsdict.items()) # a list of tuples
|
bycodeslist = sorted(pathsdict.items()) # a list of tuples
|
||||||
bypaths = sorted(pathsdict.values()) # a list
|
bycodeslist2 = []
|
||||||
|
|
||||||
|
for k, p in bycodeslist:
|
||||||
|
bycodeslist2.append((k, p, str(pathstype[k])))
|
||||||
|
|
||||||
|
bypaths = sorted(pathsdict.values()) # a list
|
||||||
bypathslist = []
|
bypathslist = []
|
||||||
|
|
||||||
for p in bypaths:
|
for p in bypaths:
|
||||||
for k in pathsdict.keys():
|
for k in pathsdict.keys():
|
||||||
if pathsdict[k] == p:
|
if pathsdict[k] == p:
|
||||||
bypathslist.append((p, k))
|
bypathslist.append((p, k, str(pathstype[k])))
|
||||||
del pathsdict[k]
|
del pathsdict[k]
|
||||||
break
|
break
|
||||||
#bypaths = sorted(bycodeslist, key=bycodeslist[1])
|
|
||||||
# iterate through the dictionary and append each tuple into the temporary list
|
|
||||||
#f#=or w in bypaths:
|
|
||||||
# bypathslist[w] = pathsdict[w]
|
|
||||||
|
|
||||||
return render(request, 'pathsreport.html', {
|
return render(request, 'pathsreport.html', {
|
||||||
"pathsdict":pathsdict,
|
"pathsdict":pathsdict,
|
||||||
"bycodeslist":bycodeslist,
|
"bycodeslist":bycodeslist2,
|
||||||
"bypathslist":bypathslist,
|
"bypathslist":bypathslist,
|
||||||
"ncodes":ncodes})
|
"ncodes":ncodes})
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<p>
|
<p>
|
||||||
|
|
||||||
<table style="font-family: Consolas, Lucida Console, monospace;">
|
<table style="font-family: Consolas, Lucida Console, monospace;">
|
||||||
<tr><th>Code</th><th>Path</th></tr>
|
<tr><th>Code</th><th>Path</th><th>Type</th></tr>
|
||||||
{% for c,p in bycodeslist %}
|
{% for c,p,t in bycodeslist %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{c}}
|
{{c}}
|
||||||
@ -21,14 +21,17 @@
|
|||||||
<td>
|
<td>
|
||||||
{{p}}
|
{{p}}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{t}}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<table style="font-family: Consolas, Lucida Console, monospace;">
|
<table style="font-family: Consolas, Lucida Console, monospace;">
|
||||||
<tr><th>Path</th><th>Code</th></tr>
|
<tr><th>Path</th><th>Code</th><th>Type</th></tr>
|
||||||
{% for c,p in bypathslist %}
|
{% for c,p,t in bypathslist %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{p}}
|
{{p}}
|
||||||
@ -36,6 +39,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{{c}}
|
{{c}}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{t}}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user