Mercurial > genshi > genshi-test
annotate examples/tutorial/geddit/templates/info.xml @ 627:2f4dc32a13e7
GenshiTutorial: minor tweaks to sync with Wiki page.
author | cmlenz |
---|---|
date | Fri, 31 Aug 2007 23:13:27 +0000 |
parents | 9c89e22516b4 |
children | e414dc0bca5c |
rev | line source |
---|---|
622 | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <feed xmlns="http://www.w3.org/2005/Atom" | |
3 xmlns:py="http://genshi.edgewall.org/"> | |
4 | |
5 <title>Geddit: ${link.title}</title> | |
6 <id href="${url('/info/%s/' % link.id)}"/> | |
7 <link rel="alternate" href="${url('/info/%s/' % link.id)}" type="text/html"/> | |
8 <link rel="self" href="${url('/feed/%s/' % link.id)}" type="application/atom+xml"/> | |
9 <updated py:with="time=link.comments and link.comments)[-1].time or link.time"> | |
10 ${time.isoformat()} | |
11 </updated> | |
12 | |
13 <entry py:for="idx, comment in enumerate(reversed(link.comments))"> | |
14 <title>Comment ${len(link.comments) - idx} on “${link.title}”</title> | |
15 <link rel="alternate" href="${url('/info/%s/' % link.id)}#comment${idx}" | |
16 type="text/html"/> | |
17 <id>${url('/info/%s/' % link.id)}#comment${idx}</id> | |
18 <author> | |
19 <name>${comment.username}</name> | |
20 </author> | |
21 <updated>${comment.time.isoformat()}</updated> | |
623
9c89e22516b4
GenshiTutorial: Minor updates to Atom feed templates.
cmlenz
parents:
622
diff
changeset
|
22 <content>${comment.content}</content> |
622 | 23 </entry> |
24 | |
25 </feed> |