>> First of all, I would like to know, whether my idea that request.params
>> should be there is correct.
>
> You called it with "?par1=xxx", so c.par1 should be "xxx" and that
> should be the default value in the text box.;
>
> In 'save' decorated with @validate, you'd get the processed variables
> from self.form_result. request.params contains the variables as they
> were before validating.

Yes, in save. Not in index though.
   @validate(schema=V1(),form="index")
                                                ^^^^^^^
this index

>> I added some debug prints and found out that the request.params,
>> as well as request.POST get cleared after setting
>> request.environ['REQUEST_METHOD']
>>        if errors:
>>            ....
>>            request.environ['REQUEST_METHOD'] = 'GET'
>>
>> They stay in request.environ['webob._parsed_post_vars'][0] though.
>
> Why would you want to set the request method? it should stay as it

I forgot to mention: This happens in pylons/decorators/__init__.py's
validate. So it's not me who sets the request method :-)
True enough, if I comment that line out, my code starts working again.

> Maybe WebOb clears them out because of how it intended REQUEST_METHOD
> to be set. If you think it's a bug you can bring it up on the Paste
> list.

I am not sure if it is a bug. Still no harm in asking on the Paste list.
Thanks!
--
Petr

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to