Rev 199: Template is now compiled dynamically, to ease development. in http://bzr.daniel-watkins.co.uk/pqm/ui
Daniel Watkins
daniel at daniel-watkins.co.uk
Thu Jul 10 13:49:27 BST 2008
At http://bzr.daniel-watkins.co.uk/pqm/ui
------------------------------------------------------------
revno: 199
revision-id: daniel at daniel-watkins.co.uk-20080710124814-2cna51dcmttk0tj0
parent: daniel at daniel-watkins.co.uk-20080710123224-2r5o3b1ykzyxcsbk
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: ui
timestamp: Thu 2008-07-10 13:48:14 +0100
message:
Template is now compiled dynamically, to ease development.
-------------- next part --------------
=== modified file 'pqm/ui/template.py'
--- a/pqm/ui/template.py 2008-07-10 12:32:24 +0000
+++ b/pqm/ui/template.py 2008-07-10 12:48:14 +0000
@@ -1,7 +1,4 @@
-from simpletal.simpleTAL import compileHTMLTemplate
-
-template = compileHTMLTemplate("""
-<html>
+html_template = """<html>
<head>
<title>Patch Queue Manager</title>
</head>
@@ -59,4 +56,4 @@
</div>
</body>
-</html>""")
+</html>"""
=== modified file 'pqm/ui/twistd.py'
--- a/pqm/ui/twistd.py 2008-07-10 10:03:16 +0000
+++ b/pqm/ui/twistd.py 2008-07-10 12:48:14 +0000
@@ -23,12 +23,13 @@
import sys
import time
+from simpletal.simpleTAL import compileHTMLTemplate
from simpletal.simpleTALES import Context
from twisted.application import internet, service
from twisted.web import resource, server, static
import pqm
-from pqm.ui.template import template
+from pqm.ui.template import html_template
class QueueResource(resource.Resource):
@@ -52,6 +53,7 @@
return self.getProjectPage(None, request).render(request)
def getProjectPage(self, selected_project, request):
+ template = compileHTMLTemplate(html_template)
c = Context(allowPythonPath=True)
c.addGlobal('processing', self.currentlyProcessing())
c.addGlobal('messages', [self.getMessageDict(selected_project, m)
More information about the bazaar-commits
mailing list