Commit 4dfceb53 authored by eric's avatar eric
Browse files

Show participants in template, sniff’em in indexing

parent 3325793b
......@@ -93,6 +93,7 @@ short_names = {
"http://purl.org/dc/terms/type" : "type",
"http://purl.org/dc/terms/identifier" : "id",
"http://purl.org/dc/terms/subject" : "tag",
"http://purl.org/dc/terms/contributor" : "participant",
}
HOST = None
......@@ -134,6 +135,10 @@ def query_results_to_template_articles(query_results):
if 'tags' not in article:
article['tags'] = []
article['tags'].append(value)
elif key == "http://purl.org/dc/terms/contributor":
if 'participants' not in article:
article['participants'] = []
article['participants'].append(value)
elif key == "http://purl.org/dc/terms/title":
txt = "found title %s" % value
print txt.encode('utf-8')
......
......@@ -66,8 +66,17 @@
{% block content %}
{% if meta.tags %}<ul>
{% for tag in meta.tags%}<li property="dc:subject">{{ tag }}</li>{% endfor %}
{% if meta.tags %}
<h2>Tags</h2>
<ul>
{% for tag in meta.tags%}<li property="dc:subject">{{ tag }}</li>
{% endfor %}
</ul>{% endif %}
{% if meta.participants %}
<h2>Participants</h2>
<ul>
{% for participant in meta.participants %}<li property="dc:contributor">{{ participant }}</li>
{% endfor %}
</ul>{% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment