From 6517a1a37cc97e351c7347076c451bc4aff6c239 Mon Sep 17 00:00:00 2001 From: Brett Gerry Date: Tue, 13 Jan 2015 14:47:41 -0800 Subject: [PATCH] deprecate TextField in favor of StringField --- docs/patterns/wtforms.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/patterns/wtforms.rst b/docs/patterns/wtforms.rst index 44b699e2..38e652e8 100644 --- a/docs/patterns/wtforms.rst +++ b/docs/patterns/wtforms.rst @@ -26,11 +26,11 @@ The Forms 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): - username = TextField('Username', [validators.Length(min=4, max=25)]) - email = TextField('Email Address', [validators.Length(min=6, max=35)]) + username = StringField('Username', [validators.Length(min=4, max=25)]) + email = StringField('Email Address', [validators.Length(min=6, max=35)]) password = PasswordField('New Password', [ validators.Required(), validators.EqualTo('confirm', message='Passwords must match')