[Zope3-Users] How to access "request" variable from vocabulary
Adam Groszer
agroszer at gmail.com
Mon Aug 6 12:36:53 EDT 2007
Hello Hermann,
I'm using something like this:
def getCurrentRequest():
return getInteraction().participations[0]
Monday, August 6, 2007, 6:32:16 PM, you wrote:
> Hi,
> I have a simple function that is registered a vocabulary for a Choice-widget.
> My problem is that the vocabulary should access the session, which seems to be
> only possible if I somehow get the "request" variable, which is available in
> a view. (A common way to retrieve the session seems to
> be "session=ISession(self.request)[KEY])".
> However, the vocabulary seems to get only the context as a parameter but not
> the view.
> How can I solve this problem?
> Best Regards,
> Hermann
--
Best regards,
Adam mailto:agroszer at gmail.com
More information about the Zope3-users
mailing list