Add linkify to the default template namespace.

This commit is contained in:
Ben Darnell 2011-02-16 13:34:35 -08:00
parent 05b62938e2
commit 4e6b96fbcb
2 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,7 @@ class Template(object):
"url_escape": escape.url_escape,
"json_encode": escape.json_encode,
"squeeze": escape.squeeze,
"linkify": escape.linkify,
"datetime": datetime,
}
namespace.update(kwargs)

View File

@ -270,6 +270,7 @@ not present).
* `url_escape`: alias for `tornado.escape.url_escape`
* `json_encode`: alias for `tornado.escape.json_encode`
* `squeeze`: alias for `tornado.escape.squeeze`
* `linkify`: alias for `tornado.escape.linkify`
* `datetime`: the Python `datetime` module
* `handler`: the current `RequestHandler` object
* `request`: alias for `handler.request`