Blank
Blank

Reputation: 4695

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_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

Upvotes: 0

Views: 1067

Answers (1)

snahor
snahor

Reputation: 1201

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.

Upvotes: 1

Related Questions