Mercurial > genshi > mirror
diff examples/tutorial/geddit/templates/index.xml @ 622:6780f1b1b20d trunk
GenshiTutorial: add Atom feeds.
author | cmlenz |
---|---|
date | Thu, 30 Aug 2007 22:49:48 +0000 |
parents | |
children | 58be58c03509 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/examples/tutorial/geddit/templates/index.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom" + xmlns:py="http://genshi.edgewall.org/"> + + <title>Geddit</title> + <id href="${url('/')}"/> + <link rel="alternate" href="${url('/')}" type="text/html"/> + <link rel="self" href="${url('/feed/')}" type="application/atom+xml"/> + <updated>${links[0].time.isoformat()}</updated> + + <entry py:for="link in reversed(links)"> + <title>${link.url}</title> + <link rel="alternate" href="${link.url}" type="text/html"/> + <id>${url('/info/%s/' % link.id)}</id> + <author> + <name>${link.username}</name> + </author> + <updated>${link.time.isoformat()}</updated> + <summary>${link.title}</summary> + </entry> + +</feed>