Tornado 6.1 Documentation
class HomeHandler(tornado.web.RequestHandler): def get(self): entries = self.db.query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM entries WHERE id = %s", entry_id) if not entry: raise tornado.web.HTTPError(404) close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols: List[str]) → Optional[str][source] Override to implement subprotocol negotiation0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 4.5 Documentation
class HomeHandler(tornado.web.RequestHandler): def get(self): entries = self.db.query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM entries WHERE id = %s", entry_id) if not entry: raise tornado.web.HTTPError(404) close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols) Invoked when a new WebSocket requests specific subprotocols. subprotocols0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 5.1 Documentation
class HomeHandler(tornado.web.RequestHandler): def get(self): entries = self.db.query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM entries WHERE id = %s", entry_id) if not entry: raise tornado.web.HTTPError(404) close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols) Override to implement subprotocol negotiation. subprotocols is a list0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 6.1 Documentation
query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols: List[str]) → Optional[str] Override to implement subprotocol negotiation client. This method may be overridden to return one of those strings to select it, or None to not select a subprotocol. Failure to select a subprotocol does not automatically abort the connection, although0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 5.1 Documentation
query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols) Override to implement subprotocol negotiation. subprotocols is a list client. This method may be overridden to return one of those strings to select it, or None to not select a subprotocol. Failure to select a subprotocol does not automatically abort the connection, although0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.0 Documentation
query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols: List[str]) → Optional[str] Override to implement subprotocol negotiation client. This method may be overridden to return one of those strings to select it, or None to not select a subprotocol. Failure to select a subprotocol does not automatically abort the connection, although0 码力 | 245 页 | 885.76 KB | 1 年前3
Tornado 6.0 Documentation
class HomeHandler(tornado.web.RequestHandler): def get(self): entries = self.db.query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM entries WHERE id = %s", entry_id) if not entry: raise tornado.web.HTTPError(404) close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols: List[str]) → Optional[str][source] Override to implement subprotocol negotiation0 码力 | 869 页 | 692.83 KB | 1 年前3
Tornado 4.5 Documentation
query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols) Invoked when a new WebSocket requests specific subprotocols. subprotocols client. This method may be overridden to return one of those strings to select it, or None to not select a subprotocol. Failure to select a subprotocol does not automatically abort the connection, although0 码力 | 222 页 | 833.04 KB | 1 年前3
Tornado 6.4 Documentation
query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols: List[str]) → Optional[str] Override to implement subprotocol negotiation client. This method may be overridden to return one of those strings to select it, or None to not select a subprotocol. Failure to select a subprotocol does not automatically abort the connection, although0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
query("SELECT * FROM entries ORDER BY date DESC") self.render("home.html", entries=entries) class EntryHandler(tornado.web.RequestHandler): def get(self, entry_id): entry = self.db.get("SELECT * FROM close_reason. Changed in version 4.0: Added close_code and close_reason attributes. WebSocketHandler.select_subprotocol(subprotocols: List[str]) → Optional[str] Override to implement subprotocol negotiation client. This method may be overridden to return one of those strings to select it, or None to not select a subprotocol. Failure to select a subprotocol does not automatically abort the connection, although0 码力 | 268 页 | 1.09 MB | 1 年前3
共 20 条
- 1
- 2













