updated contextualise.py for the diverge template

This commit is contained in:
Cristina Cochior 2019-05-05 12:40:03 +02:00
parent 4522998793
commit b7e142df1b
3 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ pathofwords = []
pathofnumbers = [] pathofnumbers = []
#reading wordlist.json #reading wordlist.json
with open('wordlist.json', 'r') as f: with open('wordlist.json', 'r', encoding='utf8') as f:
wordlist_dict = json.load(f) wordlist_dict = json.load(f)
@ -128,7 +128,7 @@ def description():
@app.route('/diverge', methods=['GET']) @app.route('/diverge', methods=['GET'])
def diverge(): def diverge():
searchterm=request.args.get('search') searchterm=request.args.get('search')
return render_template('diverge.html', searchterm=searchterm) return render_template('diverge.html', wordlist_dict=wordlist_dict, searchterm=searchterm)
@app.route('/listofwords') @app.route('/listofwords')
def listofwords(): def listofwords():

View File

@ -1,4 +1,4 @@
{% extends "layout.html" %}
{% block content %} {% block content %}
<p>{{ searchterm }} : </p> <p>{{ searchterm }} : </p>