can you please post your form code and any traceback you have?
-chris On Jan 5, 11:10 am, matigro <[email protected]> wrote: > Hi people of TurboGears. > After a long time without writing any line of code in my loveling web > framework, I'm back with a little project. > I've downloaded all standard TG needs with easy_install and try to > deoxidize myself with a litle CRUD form. > > and I'm having a big problem. I'm trying to use validate() / > error_handler() in a creation form, but the only message I've got is > '"The input field 'self' was not expected." > > Im using: TG 1.0.5, ToscaWidgets 0.9.3, Kid for templating. > Perhaps I am mixing tw modules with tg modules, that was a problem > some time ago, I don't know now. > > Code: > from turbogears import validate, error_handler > from tw.forms import TableForm, TextField > from tw.api WidgetsList > from formencode import validators > > @expose(template="pruebasayjquery.templates.movie") > def new(self, **kw): > """Form to add new record""" > return dict(movie_form=movie_form) > > @validate(movie_form) > @error_handler(new) > @expose() > def create(self, **kw): > """A movie and save it to the database""" > flash kw['title'] > raise redirect("/") > > I put a print(kw) in new method and it shows: {'tg_source': <function > create at 0x018DFCB0>, 'tg_exceptions': None, 'tg_errors': "The input > field 'self' was not expected.", 'title': u''} > > Kid template is: > <body> ${movie_form()} </body> > > Any kind of form I could use! I need help, thanks. > Matias --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

