Commit Graph

22 Commits

Author SHA1 Message Date
Ben Darnell b909d37e54 docs,demos: Update for asyncio.run pattern
Adapt for Python 3.10 deprecation changes by using asyncio.run
instead of IOLoop.start throughout (except for TCPServer multi-process
docs).

Demos have all been changed but I haven't tested all of them.
2022-06-03 14:50:20 -04:00
youguanxinqing eb866b5b67 should use python3 unicode in 'blog' demo #2977 2021-01-12 18:35:38 +08:00
Poruri Sai Rahul b3c63fbce0
Update super usage (#2912)
On Python 3, super does not need to be called with arguments where as on
Python 2, super needs to be called with a class object and an instance.

This commit updates the super usage using automated regex-based search
and replace. After the automated changes were made, each change was
individually checked before committing.
2020-09-13 11:06:02 -04:00
Bruno P. Kinoshita 0e6ec1728c use bcrypt's checkpw instead of == 2019-11-29 23:49:35 +13:00
Ben Darnell 1e9a709111 demos: Format all the demos with `black` 2018-11-02 12:56:28 -04:00
chengkang e493c10e49 use queryone() instead of query() 2018-07-24 10:47:28 +08:00
chengkang 88b3baff4c fix issue #2455 2018-07-24 09:57:16 +08:00
Koki Oyatsu 8012b1cc87 fix blog demo. (GET ComposeHandler) 2018-05-31 00:40:25 +09:00
Ben Darnell 2f29baa6c6 Fix lint checks
This was being run from the wrong directory in CI so some errors had
slipped in.
2018-05-18 14:24:55 -04:00
Ben Darnell b0194d852f demos: Update blog demo
- Switch from MySQL to PostgreSQL/CockroachDB.
- Use (and require) Python 3.5+.
- Use aiopg instead of torndb.
2018-05-13 15:07:15 -04:00
Pierce Lopez 26591b5145 style fix: multiple statements on one line
flake8 code E701
2018-01-01 15:56:23 -05:00
whu_liuchang 1a8a4d3d69 Update blog.py
use recommended style
2015-04-05 20:04:50 +08:00
Ben Darnell 4f86890cfa Add make_current keyword argument to IOLoop constructor.
This allows applications to create an IOLoop to be started in another
thread without making it current in the originating thread.

Update docs to use IOLoop.current() in place of IOLoop.instance() when
starting the loop.

Closes #1390.
2015-03-29 16:31:06 -04:00
Ben Darnell a8986e481e Replace blog demo's google login with a simple email/password scheme. 2015-03-29 11:45:50 -04:00
Ben Darnell c360c34890 Add a docker-based environment for running the blog demo. 2015-03-28 15:27:56 -04:00
Ben Darnell 7a0eda1338 Remove async_callback wrapper functions, which have been obsolete since 1.1.
Closes #283.
2014-06-15 11:52:34 -04:00
Ben Darnell 920f96db6b Use distinct cookie names across all the demo apps. 2013-03-03 12:16:03 -05:00
Ben Darnell 17ec459c85 Use autoescape in blog demo. 2013-03-03 12:09:29 -05:00
Ben Darnell 186e947112 Remove tornado.database, which is now distributed separately. 2012-09-16 14:02:49 -07:00
Taylor Hughes 35b432fee2 Make it obvious to anyone reading copy-pasted example code that the cookie secret is not suitable for production use. 2012-08-31 23:47:11 -07:00
Ben Darnell 26feb663aa BACKWARDS-INCOMPATIBLE: turn on template autoescaping by default.
Disable autoescaping in demos that don't already use it.
2011-06-11 17:22:09 -07:00
Bret Taylor 2afa973493 Move Tornado project to Github 2009-09-10 00:50:51 -07:00