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 Form with Validators

Vic A
Vic A
5,452 Points

SignUpForm task glitch

I don't know why this isn't correct. I have even seen other posts that show my way is the correct way but for some reason, this code won't go through. Am I missing something?

forms.py
from flask_wtf import Form
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email, Length

class SignUpForm(Form):
    email = Stringfield('Email')
    password = PasswordField('Password')

2 Answers

Ari Misha
Ari Misha
19,323 Points

Hiya Vic! I dont see any issues with your code. Your code isnt passing coz you are not following the instructions given in the challenges. You are doing way too much stuff. You dont need to the pass in any arguments to your "StringField" and "PasswordField" yet. Here is my code and it passed in the challenges:

from flask_wtf import Form
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, Email, Length

class SignUpForm(Form):
    email = StringField()
    password = PasswordField()
Vic A
Vic A
5,452 Points

Thanks man