Commit 623d7748 authored by Jérome Perrin's avatar Jérome Perrin

knowledge_pad: show author in RSS

parent 1a0a1595
......@@ -48,6 +48,7 @@ def getRssDataAsDict(context, url, username=None, password=None):
for entry in d.entries:
entry_dict = {}
entry_dict['title'] = entry['title']
entry_dict['author'] = entry.get('author', '')
entry_dict['link'] = entry['link']
entry_dict['other_links'] = [x['href'] for x in entry['links']]
entry_dict['md5'] = md5((entry.get('guid') or entry.get('id') or entry['link']).encode()).hexdigest()
......
......@@ -54,6 +54,7 @@ for result in items:
message = newTempBase(context, 'item')
message.edit(field_title = result.get('title','No title'),
field_date = date,
field_author = result['author'],
field_content = result.get('content','No content'),
field_img = result.get('img',''),
field_others_links = result.get('other_links',''),
......
......@@ -53,7 +53,7 @@
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
......
<tal:block
tal:define="title here/field_title;
author here/field_author;
date here/field_date|nothing;
description here/field_content;
image here/field_img;
......@@ -40,7 +41,9 @@
<span class="document-title"
tal:content="title"/> -
<span class="modification-date"
tal:content="date"/>
tal:content="date"/> -
<span class="modification-date"
tal:content="author"/>
</a>
</div>
......@@ -60,7 +63,10 @@
<span class="document-title"
tal:content="title"/> -
<span class="modification-date"
tal:content="date"/>
tal:content="date"/> -
<span class="modification-date"
tal:content="author"/>
</div>
<!-- Hidden description -->
......
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