Mercurial > mozilla > hg > talosnames
diff talosnames/web.py @ 32:1a9ec766f2b0
add a thing for tbpl short names
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 23 Jul 2012 13:22:29 -0700 |
parents | c6580ad2612f |
children | 88d280049e2f |
line wrap: on
line diff
--- a/talosnames/web.py Tue Jul 17 21:36:05 2012 -0700 +++ b/talosnames/web.py Mon Jul 23 13:22:29 2012 -0700 @@ -18,7 +18,6 @@ def __init__(self, **kw): self.api = TalosNames() - self.template = file(template).read() # get data suites = sorted(self.api.suites.keys()) @@ -69,8 +68,9 @@ return response(environ, start_response) def render(self): - template = tempita.HTMLTemplate(self.template) - return template.substitute(self.data) + contents = file(template).read() + _template = tempita.HTMLTemplate(contents) + return _template.substitute(self.data) if __name__ == '__main__': from wsgiref import simple_server