in my opinion current Tornado documentation should be changed regarding xfrs sample in "overview" page.
In fact, examples refer to
If xsrf_cookies is set, the Tornado web application will set the _xsrf cookie for all users and reject all POST, PUT, and DELETE requests that do not contain a correct _xsrf value. If you turn this setting on, you need to instrument all forms that submit via POST to contain this field. You can do this with the special function xsrf_form_html(), available in all templates:
> in my opinion current Tornado documentation should be changed regarding
> xfrs sample in "overview" page.
> In fact, examples refer to
> If xsrf_cookies is set, the Tornado web application will set the _xsrf cookie
> for all users and reject all POST, PUT, and DELETE requests that do not
> contain a correct _xsrf value. If you turn this setting on, you need to
> instrument all forms that submit via POST to contain this field. You can
> do this with the special function xsrf_form_html(), available in all
> templates:
Thanks, I've updated both places in the docs that still used the old form.
I used {% module %} instead of {% raw %} since xsrf_form_html is
registered as a module, and this way offers slightly less
encouragement to use {% raw %} frequently.
-Ben
On Tue, Aug 7, 2012 at 9:59 AM, aliane abdelouahab