Pylons / deform

A Python HTML form library.
Other
417 stars 161 forks source link

hidden widget doesn't support sequences #93

Closed dholth closed 12 years ago

dholth commented 12 years ago

I worked around this by defining a widget that serializes to base64-encoded JSON

mcdonc commented 12 years ago

Not sure what this means.

dholth commented 12 years ago
class Keys(colander.SequenceSchema):
    key = colander.SchemaNode(colander.String())

class ExampleSchema(colander.MappingSchema):
    keys = Keys(widget=HiddenSequenceWidget(),
            missing=[])

ExampleSchema.keys is serialized in the form as [u'0', u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9'] and it doesn't seem to make the trip back.