Browse Source

fixed diverge template

master
Cristina Cochior 5 years ago
parent
commit
64d035150c
  1. BIN
      __pycache__/contextualise.cpython-36.pyc
  2. 2
      contextualise.py
  3. 16
      templates/diverge.html
  4. 35
      wordlist_v3.json

BIN
__pycache__/contextualise.cpython-36.pyc

Binary file not shown.

2
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)

16
templates/diverge.html

@ -1,11 +1,19 @@
{% extends "layout.html" %}
{% block content %}
<p>test</p>
<p>{{ searchterm }}</p>
<p>{{ searchterm }} : </p>
{% 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'] %}
<a href={{address}}>
{{ item['sentence'] }}
</a><br>
{% endfor %}
{% endif %}
{% endfor %}
{% endblock %}

35
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."
}
]
}
Loading…
Cancel
Save