There is a bug with the errors_for(name).
I have provided my fix to the issue there may be a better way.
https://bitbucket.org/danjac/pyramid_simpleform/issue/5/errors_for-seems-buggy
In renderers.py
line 139 was return self.errors this will return all the errors regardless
of the tag name because it is being ignored. The line should be return
self.errors[name]
line 165 content = "\n".join(HTML.tag("li", error) for error in errors)
breaks (prints out every letter in the error in it's own li) when you are
using errors_for(name) because if only one error you get back a basestring
from colander
I replaced that line with the follow which seems to work.
if isinstance(errors, basestring):
content = HTML.tag("li", errors)
else:
content = "\n".join(HTML.tag("li", error) for error in errors)
--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.warplydesigned.com
http://www.fitnessfriendsfinder.com
--
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.