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?
-SamI don't know how mustache works, but every RequestHandler has that method, so you must pass it to the template like any other value.
精彩评论