Rev 204: Added initial structure in QueueResource. in http://bzr.daniel-watkins.co.uk/pqm/rss

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Jul 10 14:49:16 BST 2008


At http://bzr.daniel-watkins.co.uk/pqm/rss

------------------------------------------------------------
revno: 204
revision-id: daniel at daniel-watkins.co.uk-20080710134803-1rf9s0v6uki5qawv
parent: daniel at daniel-watkins.co.uk-20080710134737-r1z2pm9oe82do7ny
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: rss
timestamp: Thu 2008-07-10 14:48:03 +0100
message:
  Added initial structure in QueueResource.
-------------- next part --------------
=== modified file 'pqm/ui/twistd.py'
--- a/pqm/ui/twistd.py	2008-07-10 12:48:14 +0000
+++ b/pqm/ui/twistd.py	2008-07-10 13:48:03 +0000
@@ -48,9 +48,14 @@
                                "specific page.</h1>", 'text/html').render(request)
         if len(request.postpath) > 1:
             project = request.postpath[0]
-            return self.getProjectPage(project, request).render(request)
         else:
-            return self.getProjectPage(None, request).render(request)
+            project = None
+
+        if len(request.postpath) > 0:
+            if request.postpath[-1] == "rss.xml":
+                return self.getProjectRSS(project, request).render(request)
+
+        return self.getProjectPage(project, request).render(request)
 
     def getProjectPage(self, selected_project, request):
         template = compileHTMLTemplate(html_template)
@@ -65,6 +70,9 @@
         template.expand(c, text)
         return static.Data(text.getvalue(), 'text/html')
 
+    def getProjectRSS(self, selected_project, request):
+        pass
+
     def currentlyProcessing(self):
         configp = pqm.ConfigParser()
         configp.read(self.queue.filenames)



More information about the bazaar-commits mailing list