Merge pull request #1315 from brettgerry/deprecate-textfield
Replace TextField with StringField in registration page example
This commit is contained in:
commit
dfeabb7089
1 changed files with 3 additions and 3 deletions
|
|
@ -26,11 +26,11 @@ The Forms
|
||||||
|
|
||||||
This is an example form for a typical registration page::
|
This is an example form for a typical registration page::
|
||||||
|
|
||||||
from wtforms import Form, BooleanField, TextField, PasswordField, validators
|
from wtforms import Form, BooleanField, StringField, PasswordField, validators
|
||||||
|
|
||||||
class RegistrationForm(Form):
|
class RegistrationForm(Form):
|
||||||
username = TextField('Username', [validators.Length(min=4, max=25)])
|
username = StringField('Username', [validators.Length(min=4, max=25)])
|
||||||
email = TextField('Email Address', [validators.Length(min=6, max=35)])
|
email = StringField('Email Address', [validators.Length(min=6, max=35)])
|
||||||
password = PasswordField('New Password', [
|
password = PasswordField('New Password', [
|
||||||
validators.Required(),
|
validators.Required(),
|
||||||
validators.EqualTo('confirm', message='Passwords must match')
|
validators.EqualTo('confirm', message='Passwords must match')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue