i have an error when validating a Form:
class FilteringSchema(Schema):
filter_extra_fields = True
allow_extra_fields = True
class LoginForm(Form):
class fields(WidgetsList):
user_login = TextField(
validator = UnicodeString(not_empty=True)
)
user_password = PasswordField(
validator = UnicodeString(not_empty=True)
)
validator = FilteringSchema
login_form= LoginForm(..attribs.. ,action='process')
In the controller:
@validate(login_form, error_handler='index')
def process(self):
....
the rendering works without problems. But when i
submit the form i get following error:
||
exceptions.AttributeError: 'LoginForm' object has no attribute 'to_python'
So after some hours trying to dive into the code and looking the
examples, i can't get the solution :(
Thanks in advance,
Dominik
btw here my versions:
pylons: Pylons-0.9.6rc1-py2.4.egg
toscawidgets: ToscaWidgets-0.1a2dev_r3090-py2.4.egg
twForms: twForms-0.1a2dev_r3091-py2.4.egg
it works now :)
Problem was the import in base.py
from pylons.decorators import validate
due to this, my controller import
from toscawidgets.mods.pylonshf import validate
wasn't called ....
Regards,
Dominik