new stuff
This commit is contained in:
parent
64d035150c
commit
7f455de9ae
Binary file not shown.
@ -26,10 +26,6 @@ listofdicts=[] #to be able to import and use json content
|
||||
datafromjson = []
|
||||
|
||||
|
||||
#test getting json file from id
|
||||
id = "17"
|
||||
jsonfilefordescription = "files/"+id+"/"+id+".json"
|
||||
|
||||
#arrays with the user path of words and numbers
|
||||
pathofwords = []
|
||||
pathofnumbers = []
|
||||
@ -71,10 +67,10 @@ print("-------------------------")
|
||||
dict = {} #dict for the form entries
|
||||
|
||||
|
||||
with open("static/"+jsonfilefordescription, 'r') as f:
|
||||
data_dict = json.load(f)
|
||||
datafromjson = data_dict["files"]
|
||||
print(datafromjson)
|
||||
# with open("static/"+jsonfilefordescription, 'r') as f:
|
||||
# data_dict = json.load(f)
|
||||
# datafromjson = data_dict["files"]
|
||||
# print(datafromjson)
|
||||
|
||||
@app.route("/")
|
||||
def home():
|
||||
@ -95,6 +91,11 @@ def all():
|
||||
|
||||
@app.route('/description')
|
||||
def description():
|
||||
idno=request.args.get('id')
|
||||
jsonfilefordescription = "files/"+idno+"/"+idno+".json"
|
||||
with open("static/"+jsonfilefordescription, 'r') as f:
|
||||
data_dict = json.load(f)
|
||||
datafromjson = data_dict["files"]
|
||||
#open json file, list filepaths in array and loop with thefile
|
||||
textfile=""
|
||||
with open("static/"+jsonfilefordescription, 'r') as f:
|
||||
@ -111,7 +112,7 @@ def description():
|
||||
|
||||
textfile = Markup(textfile)
|
||||
|
||||
return render_template('description.html', datafromjson=datafromjson, itemid=itemid, textfile=textfile)
|
||||
return render_template('description.html', datafromjson=datafromjson, itemid=itemid, textfile=textfile, idno=idno)
|
||||
|
||||
@app.route('/diverge', methods=['GET'])
|
||||
def diverge():
|
||||
|
Loading…
Reference in New Issue
Block a user