1. Dan Jacob
  2. pyramid_simpleform
  3. Issues
Issue #3 new

render colander.sequenceschema

rhyek
created an issue

So, basically, what should a template for a schema such as this look like? {{{ class PhoneNumbers(colander.SequenceSchema): phonenumber = colander.SchemaNode( colander.String() )

class Client(colander.MappingSchema): name = colander.SchemaNode( colander.String(), validator=colander.All(colander.Length(min=4), unique), model=Client ) comment = colander.SchemaNode( colander.String(), missing=None ) phonenumbers = PhoneNumbers() }}}

So far I have: {{{ ${form.begin()} <table> <tr> <th>${form.label('name',label='Name')}</th> <td> ${form.errorlist('name')} ${form.text('name')} </td> </tr> <tr> <th>${form.label('comment',label='Comment')}</th> <td> ${form.textarea('comment')} </td> </tr> <tr> <th>${form.label('phonenumbers',label='Phonenumbers')}</th> <td> <!-- What goes here? --> </td> </tr> <tr> <td colspan="2"> ${form.submit("submit", "Submit")} </td> </tr> </table> ${form.end()} }}}

Comments (1)

  1. Log in to comment