Rev 210: Implemented naive RSS feed. in http://bzr.daniel-watkins.co.uk/pqm/rss
Daniel Watkins
daniel at daniel-watkins.co.uk
Thu Jul 10 15:28:53 BST 2008
At http://bzr.daniel-watkins.co.uk/pqm/rss
------------------------------------------------------------
revno: 210
revision-id: daniel at daniel-watkins.co.uk-20080710142740-s428gax179nkhm31
parent: daniel at daniel-watkins.co.uk-20080710142534-mqk2qzidoj8azorx
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: rss
timestamp: Thu 2008-07-10 15:27:40 +0100
message:
Implemented naive RSS feed.
-------------- next part --------------
=== modified file 'pqm/ui/template.py'
--- a/pqm/ui/template.py 2008-07-10 13:47:37 +0000
+++ b/pqm/ui/template.py 2008-07-10 14:27:40 +0000
@@ -64,5 +64,11 @@
<title>Patch Queue Manager Queue</title>
<link></link>
<description></description>
+ <item tal:repeat="message messages">
+ <title tal:content="message/subject"></title>
+ <author tal:content="message/sender"></author>
+ <description><div tal:repeat="command message/commands" tal:replace="command" /></description>
+ <pubDate tal:content="message/submission_time"></pubDate>
+ </item>
</channel>
</rss>"""
=== modified file 'pqm/ui/tests/test_twisted.py'
--- a/pqm/ui/tests/test_twisted.py 2008-07-10 14:08:27 +0000
+++ b/pqm/ui/tests/test_twisted.py 2008-07-10 14:27:40 +0000
@@ -209,14 +209,14 @@
' <author>John.Citizen at example.com</author>\n'
' <description>Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--1</description>\n'
' <pubDate>...</pubDate>\n'
- ' </item>\n'
- ' <item>\n'
+ ' </item>'
+ '<item>\n'
' <title>A new action</title>\n'
' <author>John.Citizen at example.com</author>\n'
' <description>Merge archive at example.com/foo--bar--0 unregistered at example.com/bar--foo--1</description>\n'
' <pubDate>...</pubDate>\n'
- ' </item>\n'
- ' <item>\n'
+ ' </item>'
+ '<item>\n'
' <title>A new action</title>\n'
' <author>John.Citizen at example.com</author>\n'
' <description>Merge archive at example.com/foo--bar--0 archive2 at example.com/bar--foo--2</description>\n'
=== modified file 'pqm/ui/twistd.py'
--- a/pqm/ui/twistd.py 2008-07-10 14:25:34 +0000
+++ b/pqm/ui/twistd.py 2008-07-10 14:27:40 +0000
@@ -73,6 +73,8 @@
def getProjectRSS(self, selected_project, request):
template = compileXMLTemplate(rss_template)
c = Context()
+ c.addGlobal('messages', [self.getMessageDict(selected_project, m)
+ for m in self.queue.messages])
text = StringIO()
template.expand(c, text)
return static.Data(text.getvalue(), 'application/xml')
More information about the bazaar-commits
mailing list