Fixed WTForms example.

This commit is contained in:
Armin Ronacher 2010-04-20 11:22:20 +02:00
parent 9f0b2429d6
commit 1404a85bc5

View file

@ -22,9 +22,9 @@ This is an example form for a typical registration page::
class RegistrationForm(Form):
username = TextField('Username', [validators.Length(min=4, max=25)])
email = TextField('Email Address', [validators.Length(min=6, max=35)])
password = PasswordField('New Password', [Required(),
EqualTo('confirm', message='Passwords must match')])
confirm = PasswordField('Repeat Password')
password = PasswordField('New Password', [validators.Required()])
confirm = PasswordField('Repeat Password', [validators.EqualTo(
'confirm', message='Passwords must match')])
accept_tos = BooleanField('I accept the TOS', [validators.Required()])
In the View