Tornado 4.5 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) fetch_future.add_done_callback( lambda f: my_future.set_result(f.result())) return my_future The raw Future Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 4.5 Documentation
http_client = AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) fetch_future.add_done_callback( lambda f: my_future.set_result(f.result())) return my_future The raw Future version tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 5.1 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 5.1 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.1 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.4 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.2 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects (continued from previous page) items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 6.4 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.3 Documentation
AsyncHTTPClient() my_future = Future() fetch_future = http_client.fetch(url) def on_fetch(f): my_future.set_result(f.result().body) fetch_future.add_done_callback(on_fetch) return my_future Notice that tornado.web.Application([ url(r"/app", tornado.web.RedirectHandler, dict(url="http://itunes.apple.com/my-app-id")), ]) RedirectHandler also supports regular expression substitutions. The following rule redirects RequestHandler): def get(self): items = ["Item 1", "Item 2", "Item 3"] self.render("template.html", title="My title", items=items) Tornado templates support control statements and expressions. Control statements0 码力 | 264 页 | 1.06 MB | 1 年前3
共 20 条
- 1
- 2













