From 64d035150c0369866d0a719b33560464479cdd0c Mon Sep 17 00:00:00 2001 From: Cristina Cochior Date: Wed, 17 Apr 2019 14:44:14 +0200 Subject: [PATCH] fixed diverge template --- __pycache__/contextualise.cpython-36.pyc | Bin 3024 -> 3027 bytes contextualise.py | 2 +- templates/diverge.html | 16 ++++++++--- wordlist_v3.json | 35 +++++++++++++++++++++++ 4 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 wordlist_v3.json diff --git a/__pycache__/contextualise.cpython-36.pyc b/__pycache__/contextualise.cpython-36.pyc index 5824120038f80fccb046e681346b913410011170..fb862dbdeac2f8bd99670a1d5968dc04ea368d09 100644 GIT binary patch delta 36 rcmca0ep#H;n3tEUKw^80+(u3|79N4}{Gybc%;J*xGULq>EIZf%!6pjX delta 33 pcmcaCenFhmn3tF9%fGEL(i=J1SU7ph^NUh)GK)(#OS9}?2LQoV3o`%! 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." + } + +] + +}