Mercurial > mozilla > hg > talosnames
changeset 20:0a829ad6e116
more basic web stuff
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 10 Jul 2012 18:39:46 -0700 |
parents | aae0a420c4f7 |
children | 48b4c926be73 |
files | talosnames/templates/index.html talosnames/web.py |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/talosnames/templates/index.html Tue Jul 10 18:36:50 2012 -0700 +++ b/talosnames/templates/index.html Tue Jul 10 18:39:46 2012 -0700 @@ -1,6 +1,11 @@ <html> <head> -<title></title> +<title>Talos Names</title> +<style> +table, th, td { +border: 1px solid black; +} +</style> </head> <body> <table>
--- a/talosnames/web.py Tue Jul 10 18:36:50 2012 -0700 +++ b/talosnames/web.py Tue Jul 10 18:39:46 2012 -0700 @@ -20,13 +20,14 @@ def __call__(self, environ, start_response): request = Request(environ) - response = Response(content_type='text/plain', + response = Response(content_type='text/html', body=self.render()) return response(environ, start_response) def render(self): template = tempita.HTMLTemplate(self.template) - return template.substitute({}) + data = {} + return template.substitute(data) if __name__ == '__main__': from wsgiref import simple_server