templates/homepage/firehose.atom (814B) - raw
1 <feed xmlns="http://www.w3.org/2005/Atom"
2 xmlns:py="http://genshi.edgewall.org/"
3 xmlns:xi="http://www.w3.org/2001/XInclude">
4
5 <?python
6 from viewutils import ATOM_TIME_FORMAT
7 sorted_items = sorted(items, key=lambda item: item.publication_date, reverse=True)
8 ?>
9
10 <id>${config.get('global', 'url_base')}firehose.atom</id>
11 <title type="text">${config.get('homepage', 'firehose_Title')}</title>
12 <link rel="self" type="application/atom+xml" href="${config.get('global', 'url_base')}firehose.atom" />
13 <link rel="alternate" href="${config.get('global', 'url_base')}" />
14 <generator>constance</generator>
15 <updated py:if="sorted_items">${max(item.modified_date for item in sorted_items).strftime(ATOM_TIME_FORMAT)}</updated>
16
17 <py:for each="item in sorted_items">
18 ${item.generate_atom(config)}
19 </py:for>
20
21 </feed>