def dispatch(p, q=False): return Response.force_type(adapter.dispatch(view_func, p, catch_http_exceptions=q), env)
def view_func(endpoint, values): if raise_this is not None: raise raise_this return Response(repr((endpoint, values)))
def index(request): return Response('hello world')
def index(request): return Response('hello world', mimetype='foo/bar')
def not_found(self): content, ext = self.render('notfound.html') resp = Response(content) resp.status_code = 404 resp.mimetype = 'text/html' return resp