Thanks, variable_encode did the trick.
Makes one wonder why this (and NestedVariables) can't be there by
default though - it would make for a much smaller gap between the
easy, documented examples and the real world! All it would take is an
enanced render method and perhaps a subclass of Schema. Or perhaps
this goes on a list of recommended things to go in base.py (or
similar)?
For the record, my little example now looks like this:
import formencode.htmlfill as htmlfill
from formencode.variabledecode import variable_encode
print htmlfill.render(
'<input id="weightings-0.weight"
name="weightings-0.weight" type="text" value="" />',
variable_encode({'weightings': [{'weight':
"1.0"}]}))
Easy when you know how!
Regards,
Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---