Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Using Integer type with SelectWidget renders wrong selected values
import deform
import colander
class TestSchema(colander.MappingSchema):
list = colander.SchemaNode(colander.Integer(),
widget=deform.widget.SelectWidget(values=[(1, 'one'), (2, 'two')]))
class Test2Schema(colander.MappingSchema):
list = colander.SchemaNode(colander.Integer(),
widget=deform.widget.SelectWidget(values=[('1', 'one'), ('2', 'two')]))
print deform.Form(TestSchema()).render({'list': 1})
print deform.Form(Test2Schema()).render({'list': 1})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.