示例#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
文件: api.py 项目: jvy1106/webpyutils
 def nomethod(cls):
     return HTTPError(*build_error(
         '405 Method Not Allowed',
         'This HTTP Method is not supported on %s' % (cls.__name__)))
示例#5
0
文件: api.py 项目: jvy1106/webpyutils
 def internalerror():
     return HTTPError(*build_error('500 Internal Server Error',
                                   'An unexpected error occured'))
示例#6
0
文件: api.py 项目: jvy1106/webpyutils
 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())