{% if 'key' in handler.args %}

Success

Your key {{ handler.get_arg('key') }} has been submitted.

{% else %}

XSRF template

The XSRF key here is inserted via Tornado templating.

XSRF AJAX

The XSRF key here is inserted via AJAX.

{% end %}