mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-21 23:01:52 +00:00
Made JSON visible on wallet edit page
This commit is contained in:
parent
7f5bd2c17e
commit
e70d51e52b
@ -632,8 +632,11 @@ def walletedit(request, path=None):
|
||||
# print(f'! - FORM walletedit - jsonfile {jsonfile}')
|
||||
if not Path(jsonfile).is_file():
|
||||
metadataurl = ""
|
||||
metadata =""
|
||||
else:
|
||||
metadataurl = Path("/dwgdataraw", "walletjson") / wallet[0:4] / wallet.replace("#", ":") / "contents.json"
|
||||
with open(jsonfile, 'r') as f:
|
||||
metadata = f.read()
|
||||
psg = ""
|
||||
freetext = ""
|
||||
chkplannr = ""
|
||||
@ -826,6 +829,7 @@ def walletedit(request, path=None):
|
||||
"svxothers": svxothers,
|
||||
"create": create,
|
||||
"metadataurl": metadataurl,
|
||||
"metadata": metadata,
|
||||
"complaints": complaints,
|
||||
"caveobject": caveobject,
|
||||
"people": waldata["people"],
|
||||
|
@ -253,10 +253,20 @@
|
||||
{% else %}
|
||||
<em>No other survex files found for this date.</em><br>
|
||||
{% endif %}
|
||||
{% if metadataurl %}<u>Debug</u>:
|
||||
<span style="font-size: 70%; ">
|
||||
<a href="{{metadataurl}}">json file</a><br> {% endif %}
|
||||
</span>
|
||||
|
||||
{% if metadataurl %}<span style="font-size: 70%; "><details><summary>
|
||||
JSON <br>
|
||||
</summary>
|
||||
<a href="{{metadataurl}}">{{metadataurl}}</a><br>
|
||||
<pre>
|
||||
{{metadata}}
|
||||
</pre>
|
||||
</span>
|
||||
</details>
|
||||
{% else %}<span style="font-size: 70%; ">
|
||||
<em>No JSON file yet.</em><br>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %} <!-- not create -->
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user