21 Mar
2000
21 Mar
'00
9:45 p.m.
Ragnar Beer wrote:
I need to get rid (completely) of some items in REQUEST that were passed from a form. Is there an opposite to REQUEST.set() that deletes instead e.g. REQUEST.delete() or so?
My Very First External Method (TM) - def removeRequest(REQUEST, item): "Remove an item from a REQUEST.form" try: del REQUEST.form[item] except: pass return None And invoked (once instantiated by the Management Interface) with <dtml-call "removeRequest(REQUEST, 'form_variable')"> (Note that the except clause should really be trapping for KeyError - version 1.1 will definitely have this :-). Regards, Daryl Tester