Пример #1
0
    def _default_error(self, start_response, code, message):
        response = Struct()
        response.content = TextContent(message)
        response.code = code
        response.heads = Heads()

        return self._prepare_response(start_response, Response(response))
Пример #2
0
    def _default_index(self, start_response):
        response = Struct()
        response.content = TextContent(_(u"Index method is left out"))
        response.code = 404
        response.heads = Heads()

        return self._prepare_response(start_response, Response(response))