Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
osp
tools.ethertoff
Commits
4dfceb53
Commit
4dfceb53
authored
Sep 10, 2014
by
eric
Browse files
Show participants in template, sniff’em in indexing
parent
3325793b
Changes
2
Hide whitespace changes
Inline
Side-by-side
relearn/management/commands/index.py
View file @
4dfceb53
...
@@ -93,6 +93,7 @@ short_names = {
...
@@ -93,6 +93,7 @@ short_names = {
"http://purl.org/dc/terms/type"
:
"type"
,
"http://purl.org/dc/terms/type"
:
"type"
,
"http://purl.org/dc/terms/identifier"
:
"id"
,
"http://purl.org/dc/terms/identifier"
:
"id"
,
"http://purl.org/dc/terms/subject"
:
"tag"
,
"http://purl.org/dc/terms/subject"
:
"tag"
,
"http://purl.org/dc/terms/contributor"
:
"participant"
,
}
}
HOST
=
None
HOST
=
None
...
@@ -134,6 +135,10 @@ def query_results_to_template_articles(query_results):
...
@@ -134,6 +135,10 @@ def query_results_to_template_articles(query_results):
if
'tags'
not
in
article
:
if
'tags'
not
in
article
:
article
[
'tags'
]
=
[]
article
[
'tags'
]
=
[]
article
[
'tags'
].
append
(
value
)
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"
:
elif
key
==
"http://purl.org/dc/terms/title"
:
txt
=
"found title %s"
%
value
txt
=
"found title %s"
%
value
print
txt
.
encode
(
'utf-8'
)
print
txt
.
encode
(
'utf-8'
)
...
...
relearn/templates/pad-read.html
View file @
4dfceb53
...
@@ -66,8 +66,17 @@
...
@@ -66,8 +66,17 @@
{% block content %}
{% block content %}
{% if meta.tags %}
<ul>
{% if meta.tags %}
{% for tag in meta.tags%}
<li
property=
"dc:subject"
>
{{ tag }}
</li>
{% endfor %}
<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 %}
</ul>
{% endif %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment