31 Mar
2006
31 Mar
'06
7:09 p.m.
----- Original Message ----- From: "Jed Parsons" <jedp@ilm.com> To: <zope@zope.org> Sent: Friday, March 31, 2006 2:04 PM Subject: [Zope] reading cookies from external methods
This is probably a silly question, but how does one read cookies from an external method without passing REQUEST to the method?
The method should be callable both from dtml and from other external methods.
I know I can do this:
def foo(REQUEST): cookie = REQUEST.get('some_cookie') return cookie
You just need to access REQUEST from within your external method, eg: def foo(self, otherparms...) REQUEST = self.REQUEST cookie = REQUEST.get('some_cookie') That should do it! HTH Jonathan