Example #1
0
 def __init__(self):
     status = '500 Internal Server Error'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle500())
Example #2
0
 def __init__(self, message=None):
     status = "400 Bad Request"
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, message or self.message)
Example #3
0
 def __init__(self):
     status = '404 Not Found'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle404())
Example #4
0
 def nomethod(cls):
     return HTTPError(*build_error(
         '405 Method Not Allowed',
         'This HTTP Method is not supported on %s' % (cls.__name__)))
Example #5
0
 def internalerror():
     return HTTPError(*build_error('500 Internal Server Error',
                                   'An unexpected error occured'))
Example #6
0
 def notfound():
     return HTTPError(
         *build_error('404 Not Found', 'This page is not found'))
Example #7
0
 def __init__(self):
     status = '500 Internal Server Error'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle500())
Example #8
0
 def __init__(self):
     status = '404 Not Found'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle404())