None
@view_config(renderer="templates/form.pt", name="password_redisplay")
@demonstrate("Password Widget (redisplay on validation failure)")
def password_redisplay(self):
class Schema(colander.Schema):
password = colander.SchemaNode(
colander.String(),
validator=colander.Length(min=5, max=100),
widget=deform.widget.PasswordWidget(redisplay=True),
description="Enter a password",
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form)