None
@view_config(renderer="templates/form.pt", name="select")
@demonstrate("Select Widget")
def select(self):
choices = (
("", "- Select -"),
("habanero", "Habanero"),
("jalapeno", "Jalapeno"),
("chipotle", "Chipotle"),
)
class Schema(colander.Schema):
pepper = colander.SchemaNode(
colander.String(),
widget=deform.widget.SelectWidget(values=choices),
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form)