RE: Can't get DateTime from REQUEST. Bizarre or just dumb?
From: Loren Stafford [mailto:lstaffor@dynalogic.com]
All attempts to access executeAt result in NameError, even tho it's obviously there. What am I doing wrong?
> C:\Zope214\bin\lib\pdb.py(868)set_trace()->None -> Pdb().set_trace() (Pdb) s > C:/Zope214\lib\python\Products\ZScheduler\ZEvent.py(100)manage_edit() -> self.executeAt=executeAt (Pdb) s NameError: 'executeAt'
What is the method signature? If it doesn't include the executeAt parameter, it will not be in your namespace. REQUEST variables cannot automagically be accessed like in DTML. Does REQUEST['exexcuteAt'] work? -- Martijn Pieters, Software Engineer | Digital Creations http://www.digicool.com | Creators of Zope http://www.zope.org | mailto:mj@digicool.com ICQ: 4532236 | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 -------------------------------------------
From: Martijn Pieters <mj@digicool.com>
From: Loren Stafford [mailto:lstaffor@dynalogic.com]
All attempts to access executeAt result in NameError, even tho it's obviously there. What am I doing wrong?
> C:\Zope214\bin\lib\pdb.py(868)set_trace()->None -> Pdb().set_trace() (Pdb) s > C:/Zope214\lib\python\Products\ZScheduler\ZEvent.py(100)manage_edit() -> self.executeAt=executeAt (Pdb) s NameError: 'executeAt'
What is the method signature? If it doesn't include the executeAt parameter, it will not be in your namespace. REQUEST variables cannot automagically be accessed like in DTML.
Does REQUEST['exexcuteAt'] work?
I had to go back and study ZPublisher.HTTPRequest.HTTPRequest.__getitem__ to understand why. REQUEST is a complex animal. Yes REQUEST['executeAt'] works, as does REQUEST.executeAt. Now I will be able to rearm events after the Dispatcher fires them. If only I could get some of them to fire.... -- Thanks -- Loren
participants (2)
-
Loren Stafford -
Martijn Pieters