Пример #1
0
 def __init__(self):
     status = '500 Internal Server Error'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle500())
Пример #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)
Пример #3
0
 def __init__(self):
     status = '404 Not Found'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle404())
Пример #4
0
 def nomethod(cls):
     return HTTPError(*build_error(
         '405 Method Not Allowed',
         'This HTTP Method is not supported on %s' % (cls.__name__)))
Пример #5
0
 def internalerror():
     return HTTPError(*build_error('500 Internal Server Error',
                                   'An unexpected error occured'))
Пример #6
0
 def notfound():
     return HTTPError(
         *build_error('404 Not Found', 'This page is not found'))
Пример #7
0
 def __init__(self):
     status = '500 Internal Server Error'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle500())
Пример #8
0
 def __init__(self):
     status = '404 Not Found'
     headers = {'Content-Type': 'text/html'}
     HTTPError.__init__(self, status, headers, _Pretty.handle404())