Skip to content
Myr

deprecate TextField in favor of StringField

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Brett Gerry · committed by Brett Gerry · parent b68dc78 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/patterns/wtforms.rst+3 added-3 removed
24 unmodified lines
25---------2627This is an example form for a typical registration page::2829 from wtforms import Form, BooleanField, TextField, PasswordField, validators29 from wtforms import Form, BooleanField, StringField, PasswordField, validators3031 class RegistrationForm(Form):32 username = TextField('Username', [validators.Length(min=4, max=25)])33 email = TextField('Email Address', [validators.Length(min=6, max=35)])32 username = StringField('Username', [validators.Length(min=4, max=25)])33 email = StringField('Email Address', [validators.Length(min=6, max=35)])34 password = PasswordField('New Password', [35 validators.Required(),36 validators.EqualTo('confirm', message='Passwords must match')37 ])
89 unmodified lines