コード例 #1
0
    def __call__(self, environ, start_response):
        # This is similar to
        # Testing.ZopeTestCase.zopedoctest.functional.http

        # Commit previously done work
        transaction.commit()

        # Base64 encode auth header
        http_auth = 'HTTP_AUTHORIZATION'
        if http_auth in environ:
            environ[http_auth] = auth_header(environ[http_auth])

        publish = publish_module
        if self.browser.handleErrors:
            publish = HTTPExceptionHandler(publish)
        wsgi_result = publish(environ, start_response)

        # Sync transaction
        AppZapper().app()._p_jar.sync()

        return wsgi_result
コード例 #2
0
def getRootFolder():
    return AppZapper().app()