[Zope] delete a variable from REQUEST

indrajit926 indra indrajit926 at gmail.com
Tue Sep 30 04:10:53 EDT 2008


Hi,

thanks for ur reply.

My problem is, my code is like

#code code code

if REQUEST['usr_msg']:
      do some operations.

#some code related to project

my program control loops with above " if condition".

REQUEST is in same context.

so once REQUEST stores 'usr_msg ' every time when it goes to "if condition "
, it performs that "do some operations"

Due to above reason i want to delete that "usr_msg" variable from REQUEST

also i cannot put restriction on "usr_msg" ,because it comes from user
input, and user can give any text to that variable.

thanks,
Indrajit.

On Mon, Sep 29, 2008 at 1:36 PM, Tino Wildenhain <tino at wildenhain.de> wrote:

> Hi,
>
> indrajit926 indra wrote:
>
>> Hi All,
>>
>> Iam relatively new to zope.
>>
>> I want to delete a variable and it value from REQUEST.I used python pop()
>> and __delattr__() ,but getting attribute error.
>>
>
> Actually you can't. (Not without writing a product in filesystem
> and getting deep into zope). Why would you?
>
> What you could do is to update one of the requests namespace to
> give the variable a new value.
>
> Regards
> Tino
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20080930/f22a665d/attachment.html 


More information about the Zope mailing list