[Zope3-Users] Access request object from content_factory

Marco Mariani marco at sferacarta.com
Wed Jun 21 05:35:56 EDT 2006


Rupert Redington wrote:
> from zope.security.management import getInteraction
>
> request = getInteraction().participations[0]
>
> Why this works is outlined (IIRC) in zope/app/securitypolicy/zopepolicy.txt.
>
> There may well be better ways to fish for the request than this... any
> offerings?
>   
In my understanding, if you need to look for the request inside a
content object, you're doing something that should be done in another
place, be it a view or an adapter.

Of course, I've been wrong before :-]



More information about the Zope3-users mailing list