Subversion Repositories navi

Compare Revisions

Ignore whitespace Rev 232 → Rev 239

/webapp/main.py
82,6 → 82,20
self.redirect("/translate")
out = translate.translatesent(word, lang)
self.render("templates/translate.html", last=word, out=out, lang=lang)
class Errors(tornado.web.RequestHandler):
def get_error_html(self, status_code, **kwargs):
if status_code == 500:
return "<html><title>%(code)d: %(message)s</title>" \
"<body>%(code)d: %(message)s<br /><br />Either we are currently working on the server, or you uncovered a bug. Please check back later on. If you still get this error, please report this bug to us in the forum thread or on IRC.</body></html>" % {
"code": status_code,
"message": httplib.responses[status_code],
}
else:
return "<html><title>%(code)d: %(message)s</title>" \
"<body>%(code)d: %(message)s</body></html>" % {
"code": status_code,
"message": httplib.responses[status_code],
}
 
settings = {
"static_path": os.path.join(os.path.dirname(__file__), "static")