>> So first, why does @validate change the request method? Is it to help >> the error middleware? > > It's so that if the other method that displays the form has a REST decorator > requiring > a GET to show the form, it can still actually be run. Not an ideal solution > at all of course.
What I did in my project, I made a local copy of validate decorator where I just skipped the line that changes the request method. My action doesn't care if it's a POST or a GET. >> Second, is it normal to have side effects when changing the request >> method from POST to GET? Specifically, is there some reason it would >> blank out request.params? Should @validate or the user be doing >> something different? > > Not sure why the request.params would be blanked out, I thought the code > merely changed > the environ, its possible though that changing the environ from POST to GET > causes WebOb > to trash its old parsed POST/GET params or something? WebOb doesn't trash anything. Took me a while to figure out how it works. WebOb's request.str_POST returns nothing if the method isn't POST or PUT. request.params consists of str_POST + str_GET. -- Petr -- 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.
