Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Build a Social Network with Flask Takin' Names Registration View

igsm '
igsm '
10,440 Points

Crsf Token string rendered with the field labels?

Hey! Can someone explain what is form.hidden_tag() and how does it actually work? I cannot understand what Kenneth means in the video...

In addition. When I print field labels I get 'Csrf Token' label too on the top. How to get rid of this?

{% from 'macros.html' import render_field %}

<form method="POST" action="" class="form">
    {{ form.hidden_tag() }}
    {% for field in form %}
        {{ field.label }}
        {{ render_field(field) }}
    {% endfor %}
    <button type="submit" id="submit">Register</button>