Rev 188: Moved Mako template into a Python file, to make importing it location-agnostic. in http://bzr.daniel-watkins.co.uk/pqm/ui

Daniel Watkins daniel at daniel-watkins.co.uk
Thu Jul 10 08:43:24 BST 2008


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

------------------------------------------------------------
revno: 188
revision-id: daniel at daniel-watkins.co.uk-20080710074211-hik9edflsyu7qon1
parent: daniel at daniel-watkins.co.uk-20080710072029-ihucmm47fklq3qpk
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: ui
timestamp: Thu 2008-07-10 08:42:11 +0100
message:
  Moved Mako template into a Python file, to make importing it location-agnostic.
-------------- next part --------------
=== renamed file 'pqm/ui/template.html' => 'pqm/ui/template.py'
--- a/pqm/ui/template.html	2008-07-09 16:30:01 +0000
+++ b/pqm/ui/template.py	2008-07-10 07:42:11 +0000
@@ -1,3 +1,6 @@
+from mako.template import Template
+
+template = Template("""
 <%!
 import time
 
@@ -66,4 +69,4 @@
 %endif
 
 </body>
-</html>
+</html>""")

=== modified file 'pqm/ui/twistd.py'
--- a/pqm/ui/twistd.py	2008-07-09 16:30:01 +0000
+++ b/pqm/ui/twistd.py	2008-07-10 07:42:11 +0000
@@ -27,6 +27,7 @@
 from twisted.web import resource, server, static
 
 import pqm
+from pqm.ui.template import template
 
 
 class QueueResource(resource.Resource):
@@ -50,7 +51,6 @@
             return self.getMakoPage(None, request).render(request)
 
     def getMakoPage(self, selected_project, request):
-        template = Template(filename='pqm/ui/template.html')
         processing = self.currentlyProcessing()
         messages = [self.getMessageDict(selected_project, m)
                         for m in self.queue.messages]



More information about the bazaar-commits mailing list