----- Original Message -----
From: "Jed Parsons" <[EMAIL PROTECTED]>
To: <[email protected]>
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
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )