Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change TextField to StringField #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions _updated/app/forms.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from flask_wtf import Form
from wtforms import TextField, PasswordField
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, EqualTo, Length


class RegisterForm(Form):
name = TextField(
name = StringField(
'Username', validators=[DataRequired(), Length(min=6, max=25)]
)
email = TextField(
email = StringField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
)
password = PasswordField(
Expand All @@ -21,11 +21,11 @@ class RegisterForm(Form):


class LoginForm(Form):
name = TextField('Username', [DataRequired()])
name = StringField('Username', [DataRequired()])
password = PasswordField('Password', [DataRequired()])


class ForgotForm(Form):
email = TextField(
email = StringField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
)
10 changes: 5 additions & 5 deletions forms.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from flask_wtf import Form
from wtforms import TextField, PasswordField
from wtforms import StringField, PasswordField
from wtforms.validators import DataRequired, EqualTo, Length

# Set your classes here.


class RegisterForm(Form):
name = TextField(
name = StringField(
'Username', validators=[DataRequired(), Length(min=6, max=25)]
)
email = TextField(
email = StringField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
)
password = PasswordField(
Expand All @@ -23,11 +23,11 @@ class RegisterForm(Form):


class LoginForm(Form):
name = TextField('Username', [DataRequired()])
name = StringField('Username', [DataRequired()])
password = PasswordField('Password', [DataRequired()])


class ForgotForm(Form):
email = TextField(
email = StringField(
'Email', validators=[DataRequired(), Length(min=6, max=40)]
)