コード例 #1
0
 def dispatch(p, q=False):
     return Response.force_type(adapter.dispatch(view_func, p,
         catch_http_exceptions=q), env)
コード例 #2
0
 def view_func(endpoint, values):
     if raise_this is not None:
         raise raise_this
     return Response(repr((endpoint, values)))
コード例 #3
0
 def index(request):
     return Response('hello world')
コード例 #4
0
 def index(request):
     return Response('hello world', mimetype='foo/bar')
コード例 #5
0
ファイル: core.py プロジェクト: cordoval/Clay
 def not_found(self):
     content, ext = self.render('notfound.html')
     resp = Response(content)
     resp.status_code = 404
     resp.mimetype = 'text/html'
     return resp