On 1/11/06, Karl Guertin <[EMAIL PROTECTED]> wrote:
>
> On 1/11/06, Max Ischenko <[EMAIL PROTECTED]> wrote:
> > I'm trying to use newfangled widgets and run into a problem. I'm not sure 
> > whether I'm doing something wrong or simply run into a bug.
> >
> > After I changed line 106 of the controllers.py from:
> >             if not processed and form:
> > to:
> >             if not processed and form and kw:
> > the problem gone.
> >
> > That's using r491 of SVN.
>
> Everything in the TG codebase uses different urls for the form and its
> action. When the kw check isn't in controllers.py, the decorator
> attempts to validate a non-existent form, which gives the error you
> see.
>
> I  believe that you can safely keep the kw check in controllers.py
> because behavior changing parameters like tg_format are popped out of
> the kw dict before they get to the validator.

The problem is that the framework has no way to know if the request is
being made because of a form submission or not. Maybe that method
needs to have validation run on it (like a "save" method that always
receives form submissions). Some forms are submitted via GET, so you
can't even count on that to tell you whether you should be running the
validators or not.

Kevin

Reply via email to