Browse Source

updated contextualise.py for the diverge template

master
Cristina Cochior 5 years ago
parent
commit
b7e142df1b
  1. BIN
      __pycache__/contextualise.cpython-37.pyc
  2. 4
      contextualise.py
  3. 2
      templates/diverge.html

BIN
__pycache__/contextualise.cpython-37.pyc

Binary file not shown.

4
contextualise.py

@ -36,7 +36,7 @@ pathofwords = []
pathofnumbers = []
#reading wordlist.json
with open('wordlist.json', 'r') as f:
with open('wordlist.json', 'r', encoding='utf8') as f:
wordlist_dict = json.load(f)
@ -128,7 +128,7 @@ def description():
@app.route('/diverge', methods=['GET'])
def diverge():
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')
def listofwords():

2
templates/diverge.html

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

Loading…
Cancel
Save