diff --git a/__pycache__/contextualise.cpython-36.pyc b/__pycache__/contextualise.cpython-36.pyc index 5824120..fb862db 100644 Binary files a/__pycache__/contextualise.cpython-36.pyc and b/__pycache__/contextualise.cpython-36.pyc differ diff --git a/contextualise.py b/contextualise.py index c351efa..ecfe83c 100644 --- a/contextualise.py +++ b/contextualise.py @@ -35,7 +35,7 @@ pathofwords = [] pathofnumbers = [] #reading wordlist.json -with open('wordlist.json', 'r') as f: +with open('wordlist_v3.json', 'r') as f: wordlist_dict = json.load(f) diff --git a/templates/diverge.html b/templates/diverge.html index f10004c..6150ae9 100644 --- a/templates/diverge.html +++ b/templates/diverge.html @@ -1,11 +1,19 @@ {% extends "layout.html" %} {% block content %} -

test

-

{{ searchterm }}

+

{{ searchterm }} :

{% for word in wordlist_dict %} - {% if word==searchterm %} - {{word[0]['way']}} + {% if searchterm == word %} + {% set length_d = wordlist_dict[word]|length %} + + {% for item in wordlist_dict[word] %} + {% set address = "/description?id=" + item['id'] %} + + {{ item['sentence'] }} +
+ {% endfor %} + {% endif %} {% endfor %} + {% endblock %} diff --git a/wordlist_v3.json b/wordlist_v3.json new file mode 100644 index 0000000..8838805 --- /dev/null +++ b/wordlist_v3.json @@ -0,0 +1,35 @@ +{ +"way" : [ + { + "id" : "17", + "sentence" : "He described his own art as a way of 'ensuring that the details of everyday life, the random constellations of objects that surround us, stop going unnoticed.'" + }, + + { + "id" : "17", + "sentence" : "Another sentence like way way this." + }, + + { + "id" : "00", + "sentence" : "Our ambition, and that of our collaborating partners, is to emancipate graphic notation from the confines of the modernist tradition, in such a way that it may remain an innovative and provocative medium for decades to come." + } +], + +"artwork" : [ + { + "id" : "17", + "sentence" : "One of the originators of 'participatory' art, in which the artwork can only be experienced by the active involvement of the viewer, he is most famous for his Event Scores such as Drip Music 1962, and is widely seen as an important precursor to conceptual art." + }, + { + "id" : "00", + "sentence" : "It unfolds through a nomadic program which includes the creation of newly commissioned artworks and public events that addres scontemporary questions and issues in this particular field." + }, + { + "id" : "00", + "sentence" : "The discursive program for 2016–2017 will include lectures, presentations of newly commissioned artworks, concert evenings, and workshops." + } + +] + +}