开发者

Getting contents of Tornado's xsrf_form_html() function outside of a template

I'm using Tornado for a python application, I want to put the value of xsrf_开发者_StackOverflow社区form_html() in my forms but I'm using Mustache to render templates instead of the standard Tornado template system. Is there any way to get that value to a variable? I did try

xsrfform = xsrf_form_html()

but that didn't work. Is it under some special class name?

-Sam


I don't know how mustache works, but every RequestHandler has that method, so you must pass it to the template like any other value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜