fixed diverge template

This commit is contained in:
Cristina Cochior 2019-04-17 14:44:14 +02:00
parent d58346e7f4
commit 64d035150c
4 changed files with 48 additions and 5 deletions

View File

@ -35,7 +35,7 @@ pathofwords = []
pathofnumbers = [] pathofnumbers = []
#reading wordlist.json #reading wordlist.json
with open('wordlist.json', 'r') as f: with open('wordlist_v3.json', 'r') as f:
wordlist_dict = json.load(f) wordlist_dict = json.load(f)

View File

@ -1,11 +1,19 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block content %} {% block content %}
<p>test</p> <p>{{ searchterm }} : </p>
<p>{{ searchterm }}</p>
{% for word in wordlist_dict %} {% for word in wordlist_dict %}
{% if word==searchterm %} {% if searchterm == word %}
{{word[0]['way']}} {% set length_d = wordlist_dict[word]|length %}
{% for item in wordlist_dict[word] %}
{% set address = "/description?id=" + item['id'] %}
<a href={{address}}>
{{ item['sentence'] }}
</a><br>
{% endfor %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}

35
wordlist_v3.json Normal file
View File

@ -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 20162017 will include lectures, presentations of newly commissioned artworks, concert evenings, and workshops."
}
]
}