Question

I am using WTForms with cherrypy with a decimal field but I'm getting a typeError exception when I pass a u"" string to it. It says it needs a float when it runs the _value function. It would be nice for wtforms to respond with its validation error but its excepting.

I'm passing u"" to the decimal field. It works when a number is in there. It also works when I don't use a decimal field but use a float field. Long story short I can pas u"" to a FloatField but not a DecimalField.

Was it helpful?

Solution

So I found out you have to use werkzueg multidict and pass the kwargs to that for your forms for cherrypy.

http://groups.google.com/group/wtforms/msg/27a20dab9d24ca80

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top