Did I find the right examples for you? yes no

All Samples(53)  |  Call(38)  |  Derive(2)  |  Import(13)
L{ErrorPage} is a resource which responds with a particular
(parameterized) status and a body consisting of HTML containing some
descriptive text.  This is useful for rendering simple error pages.

@ivar template: A C{str} which will have a dictionary interpolated into
    it to generate the response body.  The dictionary has the following
    keys:

      - C{"code"}: The status code passed to L{ErrorPage.__init__}.
      - C{"brief"}: The brief description passed to L{ErrorPage.__init__}.(more...)

src/s/p/spinoff-0.7.18/spinoff/contrib/monitoring/http.py   spinoff(Download)
from twisted.internet.defer import Deferred
from twisted.web import static
from twisted.web.resource import Resource, ErrorPage
from twisted.web.server import NOT_DONE_YET, Site
from genshi.template import TemplateLoader
        'dashboard': DashboardResource,
        'dashboard.html': HtmlDashboardResource,
        'favicon.ico': lambda _: ErrorPage(status=404, brief="Not found: favicon.ico", detail=""),
    })
 
    def getChild(self, path, request):
        if path in self.CHILDREN:
            return self._child(self.CHILDREN[path])
        return ErrorPage(status=404, brief="Not found: %r" % (path,),
                         detail="The resource %r you requested was not found" % (path,))

src/s/p/spinoff-HEAD/spinoff/contrib/monitoring/http.py   spinoff(Download)
from twisted.internet.defer import Deferred
from twisted.web import static
from twisted.web.resource import Resource, ErrorPage
from twisted.web.server import NOT_DONE_YET, Site
from genshi.template import TemplateLoader
        'dashboard': DashboardResource,
        'dashboard.html': HtmlDashboardResource,
        'favicon.ico': lambda _: ErrorPage(status=404, brief="Not found: favicon.ico", detail=""),
    })
 
    def getChild(self, path, request):
        if path in self.CHILDREN:
            return self._child(self.CHILDREN[path])
        return ErrorPage(status=404, brief="Not found: %r" % (path,),
                         detail="The resource %r you requested was not found" % (path,))

src/m/a/mamayo-HEAD/mamayo/application.py   mamayo(Download)
from twisted.internet import reactor
from twisted.web.proxy import ReverseProxyResource
from twisted.web.resource import Resource, NoResource, ErrorPage
 
from mamayo.errors import NoSuchApplicationError
from mamayo.process_herding import GunicornProcessProtocol
 
_no_resource = NoResource()
_app_down = ErrorPage(
    503, 'Backend Starting',
    "The backend for this application is starting up; try again soon.")
_app_failing = ErrorPage(
    503, 'Backend Failing',
    "The backend for this application is failing to start.")
 

src/o/h/oh-mainline-HEAD/vendor/packages/twisted/twisted/web/script.py   oh-mainline(Download)
        self.doCache = 1
 
noRsrc = resource.ErrorPage(500, "Whoops! Internal Error", rpyNoResource)
 
def ResourceScript(path, registry):
def ResourceTemplate(path, registry):
    from quixote import ptl_compile
 
    glob = {'__file__': path,
            'resource': resource.ErrorPage(500, "Whoops! Internal Error",

src/t/w/Twisted-13.2.0/twisted/web/script.py   Twisted(Download)
        self.doCache = 1
 
noRsrc = resource.ErrorPage(500, "Whoops! Internal Error", rpyNoResource)
 
def ResourceScript(path, registry):
def ResourceTemplate(path, registry):
    from quixote import ptl_compile
 
    glob = {'__file__': path,
            'resource': resource.ErrorPage(500, "Whoops! Internal Error",

src/s/u/SubliminalCollaborator-HEAD/libs/twisted/web/script.py   SubliminalCollaborator(Download)
        self.doCache = 1
 
noRsrc = resource.ErrorPage(500, "Whoops! Internal Error", rpyNoResource)
 
def ResourceScript(path, registry):
def ResourceTemplate(path, registry):
    from quixote import ptl_compile
 
    glob = {'__file__': path,
            'resource': resource.ErrorPage(500, "Whoops! Internal Error",

src/u/n/UnitScan-HEAD/twisted/web/script.py   UnitScan(Download)
        self.doCache = 1
 
noRsrc = resource.ErrorPage(500, "Whoops! Internal Error", rpyNoResource)
 
def ResourceScript(path, registry):
def ResourceTemplate(path, registry):
    from quixote import ptl_compile
 
    glob = {'__file__': path,
            'resource': resource.ErrorPage(500, "Whoops! Internal Error",

src/o/h/oh-mainline-HEAD/vendor/packages/twisted/twisted/web/server.py   oh-mainline(Download)
                    'allowed': string.join(allowedMethods, ', ')
                    })
                epage = resource.ErrorPage(http.NOT_ALLOWED,
                                           "Method Not Allowed", s)
                body = epage.render(self)
            else:
                epage = resource.ErrorPage(
                    http.NOT_IMPLEMENTED, "Huh?",

src/t/w/Twisted-13.2.0/twisted/web/server.py   Twisted(Download)
                    'allowed': ', '.join(allowedMethods)
                    })
                epage = resource.ErrorPage(http.NOT_ALLOWED,
                                           "Method Not Allowed", s)
                body = epage.render(self)
            else:
                epage = resource.ErrorPage(
                    http.NOT_IMPLEMENTED, "Huh?",

src/p/o/portia-HEAD/slyd/slyd/resource.py   portia(Download)
import json, errno
from twisted.web.resource import Resource, NoResource, ErrorPage
 
 
class SlydJsonResource(Resource):
    def error(self, request, status, why):
        raise ErrorPage(request, status, why)
 
    def bad_request(self, why):
        self.error(400, "Bad Request", why)

  1 | 2 | 3 | 4  Next