Created
February 17, 2013 03:30
-
-
Save mactanxin/4969964 to your computer and use it in GitHub Desktop.
test gist public sharing through sublime text2 addon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RequestHandler(web.RequestHandler): | |
def __init__(self, application, request, status_code=None): | |
web.RequestHandler.__init__(self, application, request) | |
if status_code: self.set_status(status_code) | |
def get_error_html(self, status_code, **kwargs): | |
if status_code == 404: | |
return self.render_string('404.html') | |
elif status_code == 405: | |
return self.render_string('servererror.html') | |
elif status_code == 500: | |
return self.render_string('500.html') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment