[Zope] REQUEST.unset('property') in DTML ?

Dieter Maurer dieter at handshake.de
Tue Sep 2 21:29:55 EDT 2003


Jaroslav Lukesh wrote at 2003-9-2 13:17 +0200:
 > I was read in archives about REQUEST.unset to unset property. But published
 > patch is little older (1999) and my Zope 2.5.1 is totally different than
 > that patch. 
 > 
 > Zope does not protest when I save DTML method with
 > REQUEST.unset('property'), but when I access page, then Zope give me error
 > that unknown keyword unset.

In DTML, a non existing variable is often treated similar to
one with a false value.

Thus, you may partially emulate "unset(XXX)" with "set(XXX,None)".

If this is not an option, you can try "del REQUEST.other(XXX)"
in a Python Script. If this results in an "Unauthorized" exception,
you must do it in an External Method.


Try to avoid tampering with REQUEST.


Dieter



More information about the Zope mailing list